some fixes

This commit is contained in:
Yoshman29
2022-11-01 17:44:25 +01:00
parent e9c028489a
commit ced676cd12
4 changed files with 24 additions and 7 deletions
+14 -2
View File
@@ -147,8 +147,20 @@ class ZipFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
}
public function getFiles(folder:String):Array<String> {
// TODO
return [];
var content:Array<String> = [];
if (!folder.endsWith("/")) folder = folder + "/";
if (!__parseAsset(folder)) return [];
@:privateAccess
for(k=>e in assets) {
if (k.toLowerCase().startsWith(_parsedAsset)) {
var fileName = k.substr(_parsedAsset.length);
if (!fileName.contains("/"))
content.push(fileName);
}
}
return content;
}
#end
}