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:
player-03
2024-01-18 14:02:58 -05:00
committed by GitHub
parent 558fd0791c
commit 13865cbbc9

View File

@@ -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);