Do not modify manifest root path on asset copy, try and make Assets.loadLibrary a bit more flexible on paths
This commit is contained in:
@@ -761,9 +761,8 @@ class ProjectXMLParser extends HXProject
|
|||||||
if (manifest != null)
|
if (manifest != null)
|
||||||
{
|
{
|
||||||
library = targetPath;
|
library = targetPath;
|
||||||
manifest.rootPath = targetPath;
|
|
||||||
|
|
||||||
var asset = new Asset("", Path.combine(targetPath, "library.json"), AssetType.MANIFEST);
|
var asset = new Asset(jsonPath, Path.combine(targetPath, "library.json"), AssetType.MANIFEST);
|
||||||
asset.id = "libraries/" + library + ".json";
|
asset.id = "libraries/" + library + ".json";
|
||||||
asset.library = library;
|
asset.library = library;
|
||||||
asset.data = manifest.serialize();
|
asset.data = manifest.serialize();
|
||||||
|
|||||||
@@ -409,15 +409,17 @@ class Assets
|
|||||||
if (libraryPaths.exists(id))
|
if (libraryPaths.exists(id))
|
||||||
{
|
{
|
||||||
path = libraryPaths[id];
|
path = libraryPaths[id];
|
||||||
rootPath = defaultRootPath;
|
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (StringTools.endsWith(path, ".bundle"))
|
if (StringTools.endsWith(path, ".bundle"))
|
||||||
{
|
{
|
||||||
|
rootPath = path;
|
||||||
path += "/library.json";
|
path += "/library.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
|
||||||
path = __cacheBreak(path);
|
path = __cacheBreak(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user