Change path comparison for AddMod.

This commit is contained in:
Ottermandias 2024-06-09 22:05:37 +02:00
parent f51fc2cafd
commit f6b35497c5

View file

@ -75,7 +75,7 @@ public class ModsApi : IPenumbraApiMods, IApiService, IDisposable
if (!dir.Exists)
return ApiHelpers.Return(PenumbraApiEc.FileMissing, args);
if (_modManager.BasePath.FullName != dir.Parent?.FullName)
if (dir.Parent == null || Path.GetFullPath(_modManager.BasePath.FullName) != Path.GetFullPath(dir.Parent.FullName))
return ApiHelpers.Return(PenumbraApiEc.InvalidArgument, args);
_modManager.AddMod(dir);