Skip to content

Commit

Permalink
fixes #3816
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSanal committed Sep 26, 2023
1 parent 6783e4d commit 0200fa8
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,16 +654,19 @@ public Boolean execute(@NonNull SFTPClient client) {
isDirectory = ftpFile != null && ftpFile.isDirectory();
break;
case FILE:
isDirectory = getFile().isDirectory();
File file = getFile();
isDirectory = file != null && file.isDirectory();
break;
case ROOT:
isDirectory = NativeOperations.isDirectory(path);
break;
case DOCUMENT_FILE:
isDirectory = getDocumentFile(false).isDirectory();
DocumentFile documentFile = getDocumentFile(false);
isDirectory = documentFile != null && documentFile.isDirectory();
break;
case OTG:
isDirectory = OTGUtil.getDocumentFile(path, context, false).isDirectory();
DocumentFile otgFile = OTGUtil.getDocumentFile(path, context, false);
isDirectory = otgFile != null && otgFile.isDirectory();
break;
case DROPBOX:
case BOX:
Expand All @@ -680,7 +683,8 @@ public Boolean execute(@NonNull SFTPClient client) {
.blockingGet();
break;
default:
isDirectory = getFile().isDirectory();
File f = getFile();
isDirectory = f != null && f.isDirectory();
break;
}
return isDirectory;
Expand Down

0 comments on commit 0200fa8

Please sign in to comment.