Skip to content

Handling of restored files #3131

Closed
Closed

Description

@jancborchardt

As discussed via email cc @msrex @MTRichards @karlitschek @schiesbn:

After you undelete a file it is called <file>.restored if a file with the same name exists. From a usability perspective it would be better to make this restored file the newest version of the file with the same name

In other words, take the deleted file and make it the latest version. Also similar to uploading a file with the same name. Of course, if versions is turned off, then the existing solution would have to be the answer.

And the filename should be <file name> (restored).<extension>
instead of <file name>.<extension>.restored to appear less technical. For multiple restored versions/numbering, the number should be appended in the parentheses like so (restored 2) (starting with 2, because the initial one without a number is 1).

Concerns: How likely is it that there’s clashes with the filename though, say the file you restore is actually a different file than the one which is in Files, despite the same name? Do we use some kind of ID in the database to 100% identify a file independent from the name?

Activity

  1. MTRichards commented on Apr 25, 2013

    @MTRichards
    Contributor

    Some food for thought: I have been thinking about this from a user perspective for a couple days, and I could see both options being useful depending on the scenario. In some cases, restoring the file as the latest version makes sense, and in others it makes sense to say (restored) . Problem is, we as the system won't know which makes more sense.

  2. schiessle commented on May 7, 2013

    @schiessle
    Contributor

    Like already said by Matt it doesn't always make sense to make the restored file a new version of a existing file. The files can be completely different but by accident have the same name. I would even argue that this is the case in most situations when such conflicts arises. Just some examples why it is hard or even impossible to decide:

    • We always restore versions, not only the given file. If we merged it once with an existing file it is impossible to divide them again which can create a huge mess for the user.
    • Imagine a user moves a file "example.txt" to the trash bin, later he creates a new (entirely different) "example.txt" and moves this to the trash too. Now the user could restore both files from the trash bin and I don't think the user would expect that they get merged into one file.
    • The user could have files with the same name in different folders, which I think is quite often the case. If he restores them and the original folder no longer exists the file will be restored to the users root folder. I assume that in this situation most user wouldn't expect that the files get merged.

    On the other hand it is quite easy to merge the files after they where restored by the user if needed.

    Because it is not possible to make this decisions automatically, it is not possible to revert such a merge and because I think it is not clear that a merge is the preferred action in most cases I would leave it as it is and only change the naming for restored files like described by Jan.

  3. jancborchardt commented on Jul 25, 2013

    @jancborchardt
    ContributorAuthor

    @schiesbn sorry for the late answer. And yeah, after thinking about it I agree with you. Did you make the naming changes for restored files already so we can close this?

  4. schiessle commented on Jul 25, 2013

    @schiessle
    Contributor

    @jancborchardt what a coincidence... Today I also discovered this issue again and started to implement it 😄

    I want to combine it with some other small improvements, you can expect a pull request tomorrow.

  5. jancborchardt commented on Jul 25, 2013

    @jancborchardt
    ContributorAuthor

    Cool!

  6. schiessle commented on Jul 29, 2013

    @schiessle
    Contributor

    Implemented, see pull request above

  7. locked as resolved and limited conversation to collaborators on Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions