Fix double root path

This commit is contained in:
Joshua Granick
2019-10-08 13:13:10 -07:00
parent 21d64f9c1c
commit 274ae5fe3b
2 changed files with 5 additions and 6 deletions

View File

@@ -40,7 +40,6 @@ class Assets
public static var onChange = new Event<Void->Void>();
private static var bundlePaths = new Map<String, String>();
private static var defaultRootPath:String;
private static var libraries(default, null) = new Map<String, AssetLibrary>();
private static var libraryPaths = new Map<String, String>();
@@ -440,7 +439,7 @@ class Assets
if (libraryPaths.exists(id))
{
path = libraryPaths[id];
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
rootPath = Path.directory(path);
}
else
{
@@ -449,8 +448,10 @@ class Assets
rootPath = path;
path += "/library.json";
}
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
else
{
rootPath = Path.directory(path);
}
path = __cacheBreak(path);
}

View File

@@ -49,8 +49,6 @@ import sys.FileSystem;
}
Assets.defaultRootPath = rootPath;
#if (openfl && !flash && !display)
::if (assets != null)::::foreach assets::::if (type == "font")::openfl.text.Font.registerFont (__ASSET__OPENFL__::flatName::);
::end::::end::::end::