From 274ae5fe3bafa717462abe9d40674e498a3b09e8 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 8 Oct 2019 13:13:10 -0700 Subject: [PATCH] Fix double root path --- src/lime/utils/Assets.hx | 9 +++++---- templates/haxe/ManifestResources.hx | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lime/utils/Assets.hx b/src/lime/utils/Assets.hx index f3ea81c21..d0edf058e 100644 --- a/src/lime/utils/Assets.hx +++ b/src/lime/utils/Assets.hx @@ -40,7 +40,6 @@ class Assets public static var onChange = new EventVoid>(); private static var bundlePaths = new Map(); - private static var defaultRootPath:String; private static var libraries(default, null) = new Map(); private static var libraryPaths = new Map(); @@ -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); } diff --git a/templates/haxe/ManifestResources.hx b/templates/haxe/ManifestResources.hx index d035d84eb..ca5a3583b 100644 --- a/templates/haxe/ManifestResources.hx +++ b/templates/haxe/ManifestResources.hx @@ -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::