-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix upload download problems #12779
Fix upload download problems #12779
Conversation
@@ -361,15 +361,6 @@ public boolean existsOnDevice() { | |||
return false; | |||
} | |||
|
|||
public String getFileNameWithoutExtension(String fileName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function
@@ -726,7 +726,7 @@ private RemoteOperationResult encryptedUpload(OwnCloudClient client, OCFile pare | |||
metadata, | |||
token, | |||
client, | |||
metadataExists, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata is already available for version 2, so there is no need to check the metadataExists value for version 2 because this value is only verified for version 1.
@@ -273,7 +273,13 @@ protected RemoteOperationResult run(OwnCloudClient client) { | |||
} | |||
} | |||
|
|||
if (downloadType == DownloadType.EXPORT) { | |||
if (downloadType == DownloadType.DOWNLOAD && !file.isEncrypted()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code that was removed during end-to-end (e2e) fixes previously caused download issues for e2e. However, after recent improvements, it no longer affects e2e and doesn't disrupt normal file downloads either. Special thanks to @Unpublished for this.
I just added isEncrypted check because if we don't ignore this if block for e2e, file try to be opened as encrypted, therefore user will not able to preview file.
I tested for v1 and v2 encryption, it's working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming normal download works for me with this PR 👍
620d522
to
e692c15
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12779.apk |
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
e692c15
to
ef9c088
Compare
Duplication of |
This PR Fixes Following Problems
Note
The Spotbugs count increased due to the reintroduction of old code (with improvements) in this PR.