fix bugs. sorry to ShiJian.

This commit is contained in:
Rintim 2023-09-25 12:28:22 +08:00
parent 5c7478c385
commit 922eca6f20
1 changed files with 5 additions and 6 deletions

View File

@ -8915,11 +8915,7 @@
else if(failure == null){
failure=()=>{};
}
lib.node.fs.access(dir,lib.node.fs.constants.F_OK|lib.node.fs.constants.R_OK,err=>{
if(err) {
failure(err);
return;
}
try{
lib.node.fs.readdir(dir,(err,filelist)=>{
if(err){
failure(err);
@ -8937,7 +8933,10 @@
}
success(folders,files);
});
});
}
catch(e){
failure(e);
}
};
game.ensureDirectory=function(list,callback,file){
var directorylist;