|
|
|
|
572
|
@Override
|
572
|
@Override
|
573
|
protected Integer doInBackground(String ...args) {
|
573
|
protected Integer doInBackground(String ...args) {
|
574
|
WritableArray res = Arguments.createArray();
|
574
|
WritableArray res = Arguments.createArray();
|
|
|
575
|
+ if(args[0] == null) {
|
|
|
576
|
+ callback.invoke("lstat error: the path specified for lstat is either `null` or `undefined`.");
|
|
|
577
|
+ return 0;
|
|
|
578
|
+ }
|
575
|
File src = new File(args[0]);
|
579
|
File src = new File(args[0]);
|
576
|
if(!src.exists()) {
|
580
|
if(!src.exists()) {
|
577
|
callback.invoke("lstat error: failed to list path `" + args[0] + "` for it is not exist or it is not a folder");
|
581
|
callback.invoke("lstat error: failed to list path `" + args[0] + "` for it is not exist or it is not a folder");
|