Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fixes #3816
  • Loading branch information
VishnuSanal committed Sep 26, 2023
commit 0200fa8043f1161824f6ff8ed0d1f7356bb81b83
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