Trash should be default remove behavior

@calmh Sorry to beat the dead horse - just checking: has this been deployed yet, or what was the final decision?

I wrote up a pull request that did it for Mac, but in the end it wasn’t merged because it didn’t fit well. It’s debatable whether it’s expected for a file to end up in the trash just because we replaced it with a newer version, for example.

So there’s room here for someone to take this on and drive it home. :slight_smile: I’m probably not going to do it.

Thanks for the reply! After some thinking and reading the pull request, there seems to be 2 battles:

  1. Default behavior
  2. System trash implementation(s)

It’s debatable whether it’s expected for a file to end up in the trash just because we replaced it with a newer version, for example.

I pretty much agree the file shouldn’t end up in trash if it has been modified; however, I wouldn’t treat file deletion in the same way as replacing (modifying).

Here’s what I propose: If a file has been modified, keep the same behavior as today (just replace it). If a file has been deleted, put it in trash.

What kind of trash - I don’t have a strong opinion. It could be inside Syncthing itself, or a system trash. I learned the hard way by losing files right after setting up syncthing and most likely won’t repeat the same mistake. I’m advocating this mostly because of new users that’ll face the same scenario.

Hope that makes sense :slight_smile:

1 Like

Yeah, I think that was the conclusion. But that made it trickier to implement because our “versioner” concept that I attempted to use doesn’t account for the difference. It could, though, it’s just more or different code.

1 Like

I think it’s a reasonable strategy.

The “kind of trash” should be thought through. On desktop systems “recycle bin” approach seems appropriate, but on android, for example, there’s no user-visible analogy to it. And a lack of consistency feels kinda wrong.

Been there, scary day… lucky for me, I had some backups for critical stuff. As a lesson from that experience I always set up new repositories with “Staggered Versioning, 1 day max period” to prevent accidental deletions for folders I don’t want actual versioning for. (and use “Staggered + few months max period” for most configurations)

Also, another point to consider if someone does go forward with that PR, is to handle the transition carefully: Keep in mind that some people use “Trashcan + unlimited period” to archive stuff: i.e. photo backups from mobile (periodically delete stuff from mobile, while keeping all the media in a pile on PC in .stversions folders as a permanent media storage.) Moving it all to “Recycle Bin” may come as a bad surprise for those if not communicated properly.