Skip to content

MediaRestore restores files in incorrect paths #547

Open
@ChrisMaroglou

Description

@ChrisMaroglou

Current Situation

When restoring media files, if the path of the file contains the word "media" anywhere in the file path then this leads to the file getting extracted to the wrong path.

The culprit is the following line of code in mediarestore.py which replaces all occurences of "media/" in the path:
name = media_file_info.path.replace("media/", "")

The interesting thing is, when backing up the media files, there is no "media" root directory in the .tar file. So maybe this line of code isn't required at all?

I tried forking the code and removing this specific line of code. All tests passed when running runtests.py I don't know if this is sufficient.

Proposed Actions

No response

System Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs that need to get fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions