Skip to content
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

[REQUEST] Move files to trash instead of deleting them #9001

Closed
tbarbette opened this issue Sep 10, 2021 · 5 comments · Fixed by #11320
Closed

[REQUEST] Move files to trash instead of deleting them #9001

tbarbette opened this issue Sep 10, 2021 · 5 comments · Fixed by #11320
Assignees
Labels
Highlight p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@tbarbette
Copy link

tbarbette commented Sep 10, 2021

Due to a problem in the RAID array backing my ownCloud server, some files were thought to be received but were actually not written on the disk. As a consequence after fixing the problem and running occ files:scan the files were thought to be removed on the server.

Then, the sync made ownCloud clients delete all the concerned files. This happened before any backup could be made as it was all the recent files sent by clients, and therefore resulted in a dramatic loss.

To prevent this kind of scenario, it would be interesting to have an option to move the local files to the trash instead of permanently deleting the files.


TODO:
Remove

bool FileSystem::moveToTrash(const QString &fileName, QString *errorString)
and replace its usage with https://doc.qt.io/qt-5/qfile.html#moveToTrash

@TheOneRing
Copy link
Member

Sorry to hear that you encountered data loss.

At the moment we only support the trash on linux systems.
Qt 5.15 brought support for cross platform support.
Switching to Qt 5.15 is planned for 2.10.

The trash will only work for downloaded files not for placeholders.

@TheOneRing TheOneRing added this to the 2.10.0 milestone Sep 10, 2021
@tbarbette
Copy link
Author

Ah, so it is in the roadmap? This happened on a Mac client.

@TheOneRing
Copy link
Member

Add advanced setting: Default off

@michaelstingl michaelstingl added Highlight p2-high Escalation, on top of current planning, release blocker and removed p3-medium Normal priority labels Oct 26, 2023
erikjv added a commit that referenced this issue Oct 30, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
@erikjv erikjv linked a pull request Oct 30, 2023 that will close this issue
erikjv added a commit that referenced this issue Nov 6, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
erikjv added a commit that referenced this issue Nov 9, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
erikjv added a commit that referenced this issue Nov 16, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
erikjv added a commit that referenced this issue Nov 16, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
TheOneRing pushed a commit that referenced this issue Nov 16, 2023
Add an option to have the client not delete files when they are removed
on the remote side, but to move them into the trash bin.

Fixes: #9001
@HanaGemela
Copy link
Contributor

HanaGemela commented Nov 17, 2023

Scenarios to test:

  1. Exclude a folder in the selecting sync

Expected result: Folder has also been moved to the trash bin

  1. Check the default value

Expected result: The feature is off by default

@HanaGemela
Copy link
Contributor

Passed in ownCloud 6.0.0.12640-daily20231117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Highlight p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants