Make better use of getPath().
If you check `paths.exists()` first, then there's no benefit to calling `getPath(id)`: it always just returns `paths.get(id)`. It's more effective to let `getPath()` perform all of its checks.
This commit is contained in:
@@ -242,7 +242,8 @@ import flash.media.Sound;
|
||||
else
|
||||
{
|
||||
var basePath = rootPath == null || rootPath == "" ? "" : Path.addTrailingSlash(rootPath);
|
||||
var libPath = paths.exists(id) ? getPath(id) : id;
|
||||
var libPath = getPath(id);
|
||||
if (libPath == null) libPath = id;
|
||||
|
||||
var path = Path.join([basePath, libPath]);
|
||||
path = __cacheBreak(path);
|
||||
|
||||
Reference in New Issue
Block a user