Skip to content

Display file from other directory when it has been moved #20394

@azul

Description

@azul

With #20185 one can now link directly to a file in a directory and the default action for that file will be triggered. This was mostly introduced to make ctrl-click and middle mouse button clicks do the right thing.

However these links can also be used in other places.
Right now if the file that the link points to has been moved from the folder it will trigger a download of the zipped folder content - probably not what we want.

@jancborchardt what would the desired behavior be when:

  • I create MyFile.md.
  • I copy the link to MyFile.md in the folder (that is used to open it in another tab)
  • I move MyFile.md to another place
  • I click on the link.

I see a number of options:

  1. open the same file in the new folder (we can tell where it is by the file id)
  2. display a message that the file has been moved (maybe including the new place)
  3. only display the folder

I guess 2. would be the right thing to do. But maybe i am missing something.

Originally posted by @azul in #20185 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapneeds infostaleTicket or PR with no recent activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions