mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Use Path.Join and Path.GetFileName for adding mods to not allow arbitrary folder but only those in the penumbra root directory.
This commit is contained in:
parent
353694177e
commit
03bbba6735
1 changed files with 1 additions and 1 deletions
|
|
@ -371,7 +371,7 @@ public class PenumbraApi : IDisposable, IPenumbraApi
|
||||||
public PenumbraApiEc AddMod( string modDirectory )
|
public PenumbraApiEc AddMod( string modDirectory )
|
||||||
{
|
{
|
||||||
CheckInitialized();
|
CheckInitialized();
|
||||||
var dir = new DirectoryInfo( Path.Join( Penumbra.ModManager.BasePath.FullName, modDirectory ) );
|
var dir = new DirectoryInfo( Path.Join( Penumbra.ModManager.BasePath.FullName, Path.GetFileName(modDirectory) ) );
|
||||||
if( !dir.Exists )
|
if( !dir.Exists )
|
||||||
{
|
{
|
||||||
return PenumbraApiEc.FileMissing;
|
return PenumbraApiEc.FileMissing;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue