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){
|
else if(failure == null){
|
||||||
failure=()=>{};
|
failure=()=>{};
|
||||||
}
|
}
|
||||||
lib.node.fs.access(dir,lib.node.fs.constants.F_OK|lib.node.fs.constants.R_OK,err=>{
|
try{
|
||||||
if(err) {
|
|
||||||
failure(err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lib.node.fs.readdir(dir,(err,filelist)=>{
|
lib.node.fs.readdir(dir,(err,filelist)=>{
|
||||||
if(err){
|
if(err){
|
||||||
failure(err);
|
failure(err);
|
||||||
|
@ -9130,7 +9126,10 @@
|
||||||
}
|
}
|
||||||
success(folders,files);
|
success(folders,files);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
catch(e){
|
||||||
|
failure(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
game.ensureDirectory=function(list,callback,file){
|
game.ensureDirectory=function(list,callback,file){
|
||||||
var directorylist;
|
var directorylist;
|
||||||
|
|
Loading…
Reference in New Issue