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:
Joshua Granick
2019-06-05 15:14:54 -07:00
parent ac6d5c281c
commit a2794c9dea
2 changed files with 4 additions and 3 deletions

View File

@@ -761,9 +761,8 @@ class ProjectXMLParser extends HXProject
if (manifest != null)
{
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.library = library;
asset.data = manifest.serialize();

View File

@@ -409,15 +409,17 @@ class Assets
if (libraryPaths.exists(id))
{
path = libraryPaths[id];
rootPath = defaultRootPath;
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
}
else
{
if (StringTools.endsWith(path, ".bundle"))
{
rootPath = path;
path += "/library.json";
}
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
path = __cacheBreak(path);
}