Skip to content

rename of a folder to any subdirectory of itself should be prevented #1162

@flokaiser

Description

@flokaiser

Hi :D
littlefs currently does not catch when a folder is moved to one of its sub-directories.
This leads to the directory being moved to just disappear.
If I understand this correctly that means in the following example all storage taken up by a file with the path /a/b/file.bin will never be freed after a rename("/a/b", "/a/b/c/d")
I have attached a simple script that describes the issue better than I could in text :)

Thanks!

littlefs_rename_bug.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions