Skip to content

BugFix - Filter OCFileList #14809

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

Merged

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Apr 22, 2025

  • Tests written, or not not needed

How to reproduce?

  1. Create a new encrypted folder
  2. Upload an image file and wait for the upload to complete successfully.
  3. Attempt to upload another image file, with the same name
  4. Click on the notification tray and select the "Replace" option to solve file conflict.

Issue Demo

Screen.Recording.2025-04-22.at.09.37.01.mp4

Fix

fix.mp4

@@ -858,12 +859,18 @@ public void swapDirectory(
mFiles = updatedStorageManager.filter(currentDirectory, OCFileFilterType.Favorite);
}

// Filter out temp files from the list to prevent duplication
mFiles = OCFileExtensionsKt.filterTempFilter(mFiles);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temp files used for E2EE and swapDirectory gets called multiple times with same data. These issues will be handled in different PR.

alperozturk96 and others added 4 commits April 24, 2025 15:13
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 force-pushed the bugfix/filter-oc-file-list-adapter-items-correctly branch from e8af738 to 31a25c4 Compare April 24, 2025 13:13
Signed-off-by: alperozturk <[email protected]>
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14809.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

Codacy

Lint

TypemasterPR
Warnings5451
Errors1111

SpotBugs

CategoryBaseNew
Bad practice6565
Correctness5859
Dodgy code292280
Experimental11
Internationalization77
Malicious code vulnerability11
Multithreaded correctness77
Performance5148
Security1818
Total500486

@alperozturk96 alperozturk96 enabled auto-merge April 25, 2025 08:33
@alperozturk96 alperozturk96 merged commit baea0c9 into master Apr 28, 2025
24 of 29 checks passed
@alperozturk96 alperozturk96 deleted the bugfix/filter-oc-file-list-adapter-items-correctly branch April 28, 2025 14:45
@tobiasKaminsky tobiasKaminsky added this to the Nextcloud App 3.32.0 milestone May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants