When renaming a file, it works ok, corresponding entry in file_managed table changes.
When deleting a file, it just deletes a file from the filesystem, if it was attached to any nodes, you get broken links.
When renaming a directory, it just renames a directory on the filesystem, links in nodes get broken again.
It shouldn't be like this.

Comments

gease created an issue. See original summary.

zulljin’s picture

Thanks for the reporting. So this is a problem. We must think about how to solve it.

edepuy’s picture

We had the same problem. Table file_managed is not updated after a folder-rename.
The patch was simple, see attached.

zulljin’s picture

Hey edepuy,

Thanks for the solution. A few edits and your patch ready for release.

  • Zulljin committed 6eb0e93 on 8.x-1.x authored by edepuy
    Issue #2950130 by edepuy, Zulljin, gease: Delete file and rename folder...
zulljin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.