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

Ability to disable trash bin on External Storage (or have separate trash bin on the external storage) #14436

Open
efelon opened this issue Feb 28, 2019 · 11 comments

Comments

@efelon
Copy link

efelon commented Feb 28, 2019

Is your feature request related to a problem? Please describe.
When adding external storage folder (e.g. SMB) they integrate nicely. But when deleting elements out of those folder they will be moved to local trash bin, which can take a very long time depending on the file size, connection, etc. and this may sometimes even not be desired.

Describe the solution you'd like
A good general solution would be to disable trash bin manually on a per folder basis. Or in the settings where the user can list folders to be excluded.

Describe alternatives you've considered
One alternative would be to outsource the solution specifically to the external storage add-on and provide a similar option only there on a per share basis.

@efelon efelon added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Feb 28, 2019
@efelon
Copy link
Author

efelon commented Jan 16, 2020

Related to #18396

@Taomyn
Copy link

Taomyn commented Feb 5, 2020

I agree with including this enhancement, having files moved across from external storage especially if it's located remotely e.g. SMB or even AWS, is not always desirable, more so if the files are extremely large.

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of feature: external storage feature: trashbin and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 28, 2021
@tnyeanderson
Copy link

This is very relevant for people who use seedvault for android backups with Nextcloud as a backup target. A ton of random files will be placed in trash on a daily basis, and it would be great if we could exclude the seedvault directory contents from being "recycled", as otherwise I am constantly at risk of running out of space and have to delete the files manually. Standard trash retention policies are not effective for this issue.

I suggest a .notrash or .norecycle file in the directory to recursively disallow moving files to the trash/recycling when they are deleted. In case it is important for implementation, the files I mention are not deleted by the user, but by some automated process.

@tnyeanderson
Copy link

Looks like the implementation belongs in the moveToTrash function, but I'm not sure as I'm unfamiliar with the code here.

@Pecacheu
Copy link

Pecacheu commented Jan 30, 2023

How is this even still a thing in a mature cloud storage application? If it hadn't been raised as an issue till recently that would be one thing, but... There are multiple issues and pull requests regarding this same problem, and dozens of relevant search results of forum posts that date back years. Yet there's no timeline for merging the pull request apparently and it's been closed? I mean, certainly not encouraging me to help if that's how community contribution is treated.

The best solution we have right now is 'create a symlink for every user's trash folder.' And that only works if you only have one external device. This is absurd. Per-device trash is a basic feature that any user would expect, and has existed in Linux, Windows, Mac OS, not to mention part of SMB/NFS/etc protocols, for over a decade.

How does it make ANY sense that you'd download a file to local disk storage to put it in a local trash folder instead of just moving the file into a hidden folder of a standard format such as .Trash-$UID or .trash/$username. It blows my mind that that the decision was actively made to make it work this way to begin with. The External Storage extension just straight up shouldn't have been released in this state, which I'd call counter-intuitive at best, and broken at worst.

It's also perfectly normal on most NAS hardware (such as mine) that the primary drive is some puny internal storage device that usually can't handle being filled up with everyone's junk. And when it comes to using the plugin for network or cloud storage, it makes even less sense, now you're pulling large files over the internet all just to "delete" them when you could've simply called a single move/rename command to place it in a trash folder without going cross-device.

@tnyeanderson
Copy link

@Pecacheu Of course I understand your frustration, I am waiting on this feature as well and it is a huge pain point for me.

However, we have to remember that there are 2,300 open issues at the moment, and over 15,000 total issues have been in this repo. The Nextcloud team is rather small and stretched thin (I might say due to the decision to bloat features, but I can't be the one to determine that).

I try to contribute where I can, and I encourage everyone to do the same. You and I can prioritize this very highly, but at the end of the day the Nextcloud team might not, and we have to either be patient and wait for the fix for free, or get our hands dirty and start implementing these things ourselves. Or maybe a bounty would help get some eyes on it.

In the meantime, I'll try to take another look at implementation on this in the coming weeks.

@Pecacheu
Copy link

@tnyeanderson Alright fair point, that is a LOT of issues haha. Perhaps I can take a look and add some logging in that moveToTrash function you pointed out, to see if/what it gets called with when using the External Storage plugin.

As for now, the temporary "hotfix" people have suggested, creating a symlink to redirect where the trash goes, will work for me since I only have one shared external location mounted. Best that all trash is directed to the BIG disk.

@loeffelpan
Copy link

loeffelpan commented Mar 26, 2023

Any news on this?
I get the point that there is an huge amount of issues and most of them may have higher prio than this.

But at least this one and #18396 show, that there is real pain for some users including me.
Just flooded my primary disk with trashbin-files from a much larger disk I'm using via external storage. And the deletion progress (which is a copy instead) is also pain, as it takes much more time as I would expect for a deletion.

Maybe @szaimen can take another look at #22632 and #23489 how to implement this at least for external storage?

@joshtrichards
Copy link
Member

Related recent merge: #38623

@labor4
Copy link
Contributor

labor4 commented Mar 29, 2024

In recent years I just disabled the "Deleted Files" app.
But now that produces errors.
What is the best way to disable the trash entirely?

We're using big files. Sadly this concept is conflicting.

@joshtrichards joshtrichards changed the title Disable trash per folder; Especially for external storage folder Ability to disable trash bin on External Storage (and/or per folder) Aug 27, 2024
@jancborchardt jancborchardt moved this to 🧭 Planning evaluation / ideas in 🖍 Design team Sep 12, 2024
@jancborchardt jancborchardt changed the title Ability to disable trash bin on External Storage (and/or per folder) Ability to disable trash bin on External Storage (or have separate trash bin on the external storage) Sep 12, 2024
@sorbaugh
Copy link
Contributor

sorbaugh commented Oct 7, 2024

There is this PR that attempted to fix this issue some years back #23489

Unfortunately we can't resurrect it due to the frontend having been migrated to vue and a few other backend-side nitpicks, it would be better to create a PR from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🧭 Planning evaluation / ideas
Development

No branches or pull requests

9 participants