mirror of https://github.com/nextcloud/android
Fix for e2e
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
057387a720
commit
ef9c088761
|
@ -49,12 +49,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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ public class DownloadFileOperation extends RemoteOperation {
|
|||
}
|
||||
}
|
||||
|
||||
if (downloadType == DownloadType.DOWNLOAD) {
|
||||
if (downloadType == DownloadType.DOWNLOAD && !file.isEncrypted()) {
|
||||
moved = tmpFile.renameTo(newFile);
|
||||
newFile.setLastModified(file.getModificationTimestamp());
|
||||
if (!moved) {
|
||||
|
|
Loading…
Reference in New Issue