Skip to content

Commit

Permalink
Fix for e2e
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <alper_ozturk@proton.me>
  • Loading branch information
alperozturk96 committed Apr 1, 2024
1 parent 1fca21c commit 620d522
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ class FileDownloadHelper {
val fileStorageManager = FileDataStorageManager(user, MainApp.getAppContext().contentResolver)
val topParentId = fileStorageManager.getTopParentId(file)

return if (file.isFolder) {
backgroundJobManager.isStartFileDownloadJobScheduled(user, file.fileId) ||
backgroundJobManager.isStartFileDownloadJobScheduled(user, topParentId)
val isJobScheduled = backgroundJobManager.isStartFileDownloadJobScheduled(user, file.fileId)
return isJobScheduled || if (file.isFolder) {
backgroundJobManager.isStartFileDownloadJobScheduled(user, topParentId)
} else {
backgroundJobManager.isStartFileDownloadJobScheduled(user, file.fileId) ||
FileDownloadWorker.isDownloading(user.accountName, file.fileId)
FileDownloadWorker.isDownloading(user.accountName, file.fileId)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {
}
}

if (downloadType == DownloadType.DOWNLOAD) {
if (downloadType == DownloadType.DOWNLOAD && !file.isEncrypted()) {
moved = tmpFile.renameTo(newFile);
newFile.setLastModified(file.getModificationTimestamp());
if (!moved) {
Expand Down

0 comments on commit 620d522

Please sign in to comment.