Merge pull request #1447 from chatziko/rootPath-improvements
rootPath-related improvements
This commit is contained in:
@@ -241,11 +241,10 @@ import flash.media.Sound;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var basePath = rootPath;
|
var basePath = rootPath == null || rootPath == "" ? "" : Path.addTrailingSlash(rootPath);
|
||||||
if (basePath == null) basePath = "";
|
var libPath = paths.exists(id) ? paths.get(id) : id;
|
||||||
if (basePath != "" && !StringTools.endsWith(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);
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ import sys.FileSystem;
|
|||||||
|
|
||||||
rootPath = Reflect.field (config, "rootPath");
|
rootPath = Reflect.field (config, "rootPath");
|
||||||
|
|
||||||
|
if(!StringTools.endsWith (rootPath, "/")) {
|
||||||
|
|
||||||
|
rootPath += "/";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rootPath == null) {
|
if (rootPath == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user