hopefully fix #4814

This commit is contained in:
cyn0x8
2025-05-02 16:41:03 -05:00
committed by Abnormal
parent a74369c77e
commit 6f43438cdb
2 changed files with 10 additions and 8 deletions
+6 -2
View File
@@ -80,8 +80,10 @@ class PolymodHandler
*/
public static function loadAllMods():Void
{
#if sys
// Create the mod root if it doesn't exist.
createModRoot();
#end
trace('Initializing Polymod (using all mods)...');
loadModsById(getAllModIds());
}
@@ -91,9 +93,10 @@ class PolymodHandler
*/
public static function loadEnabledMods():Void
{
#if sys
// Create the mod root if it doesn't exist.
createModRoot();
#end
trace('Initializing Polymod (using configured mods)...');
loadModsById(Save.instance.enabledModIds);
}
@@ -103,9 +106,10 @@ class PolymodHandler
*/
public static function loadNoMods():Void
{
#if sys
// Create the mod root if it doesn't exist.
createModRoot();
#end
// We still need to configure the debug print calls etc.
trace('Initializing Polymod (using no mods)...');
loadModsById([]);
+4 -6
View File
@@ -621,8 +621,6 @@ class FileUtil
throw 'Target path is a directory, not a file: "$path"';
}
createDirIfNotExists(Path.directory(path));
var shouldWrite:Bool = true;
switch (mode)
{
@@ -811,14 +809,14 @@ class FileUtil
*/
public static function createDirIfNotExists(dir:String):Void
{
#if sys
if (!directoryExists(dir))
{
#if sys
sys.FileSystem.createDirectory(dir);
#else
throw 'Directory creation is not supported on this platform.';
#end
}
#else
throw 'Directory creation is not supported on this platform.';
#end
}
/**