PackedAssetLibrary: use Path.join for rootPath

This commit is contained in:
Kostas Chatzikokolakis
2021-01-27 13:34:49 +02:00
parent 152bd3df2c
commit d2fcc5547d

View File

@@ -241,11 +241,10 @@ import flash.media.Sound;
} }
else else
{ {
var basePath = rootPath; var basePath = (rootPath == null ? "" : rootPath);
if (basePath == null) basePath = ""; var libPath = (paths.exists(id) ? paths.get(id) : id);
if (basePath != "") basePath += "/";
var path = basePath + (paths.exists(id) ? paths.get(id) : id); var path = Path.join([basePath, libPath]);
path = __cacheBreak(path); path = __cacheBreak(path);
Bytes.loadFromFile(path).onError(promise.error).onComplete(packedData_onComplete); Bytes.loadFromFile(path).onError(promise.error).onComplete(packedData_onComplete);