Merge pull request #384 from nofficalfs/PR-Bug-NodeFsCompat
[Bug] 修复由理电脑版的第二个兼容问题
This commit is contained in:
commit
784eb578d5
11
game/game.js
11
game/game.js
|
@ -9108,11 +9108,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);
|
||||
|
@ -9130,7 +9126,10 @@
|
|||
}
|
||||
success(folders,files);
|
||||
});
|
||||
});
|
||||
}
|
||||
catch(e){
|
||||
failure(e);
|
||||
}
|
||||
};
|
||||
game.ensureDirectory=function(list,callback,file){
|
||||
var directorylist;
|
||||
|
|
Loading…
Reference in New Issue