hopefully fix #4814
This commit is contained in:
@@ -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([]);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user