From a2794c9deae2bd7e1ea013d979504221fbc35bb1 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 5 Jun 2019 15:14:54 -0700 Subject: [PATCH] Do not modify manifest root path on asset copy, try and make Assets.loadLibrary a bit more flexible on paths --- src/lime/tools/ProjectXMLParser.hx | 3 +-- src/lime/utils/Assets.hx | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lime/tools/ProjectXMLParser.hx b/src/lime/tools/ProjectXMLParser.hx index 19216c4e8..0bef6f955 100644 --- a/src/lime/tools/ProjectXMLParser.hx +++ b/src/lime/tools/ProjectXMLParser.hx @@ -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(); diff --git a/src/lime/utils/Assets.hx b/src/lime/utils/Assets.hx index d8a05a92b..7c3499d21 100644 --- a/src/lime/utils/Assets.hx +++ b/src/lime/utils/Assets.hx @@ -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); }