Fix double root path
This commit is contained in:
@@ -40,7 +40,6 @@ class Assets
|
|||||||
public static var onChange = new Event<Void->Void>();
|
public static var onChange = new Event<Void->Void>();
|
||||||
|
|
||||||
private static var bundlePaths = new Map<String, String>();
|
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 libraries(default, null) = new Map<String, AssetLibrary>();
|
||||||
private static var libraryPaths = new Map<String, String>();
|
private static var libraryPaths = new Map<String, String>();
|
||||||
|
|
||||||
@@ -440,7 +439,7 @@ class Assets
|
|||||||
if (libraryPaths.exists(id))
|
if (libraryPaths.exists(id))
|
||||||
{
|
{
|
||||||
path = libraryPaths[id];
|
path = libraryPaths[id];
|
||||||
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
|
rootPath = Path.directory(path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -449,8 +448,10 @@ class Assets
|
|||||||
rootPath = path;
|
rootPath = path;
|
||||||
path += "/library.json";
|
path += "/library.json";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
|
{
|
||||||
|
rootPath = Path.directory(path);
|
||||||
|
}
|
||||||
path = __cacheBreak(path);
|
path = __cacheBreak(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ import sys.FileSystem;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Assets.defaultRootPath = rootPath;
|
|
||||||
|
|
||||||
#if (openfl && !flash && !display)
|
#if (openfl && !flash && !display)
|
||||||
::if (assets != null)::::foreach assets::::if (type == "font")::openfl.text.Font.registerFont (__ASSET__OPENFL__::flatName::);
|
::if (assets != null)::::foreach assets::::if (type == "font")::openfl.text.Font.registerFont (__ASSET__OPENFL__::flatName::);
|
||||||
::end::::end::::end::
|
::end::::end::::end::
|
||||||
|
|||||||
Reference in New Issue
Block a user