Skip to content

trailing '/' on file confuses stat but not open #1040

Open
@rob-zeno

Description

@rob-zeno

Recently integrated littlefs support into my Zephyr-based application and was doing some crude tests.

I noticed that if I create a file:

   `/mountpoint/file`

And then I pass

   `/mountpoint/file/`

(note the trailing '/') to Zephyr's fs_stat (which calls lfs_stat), it will return information about the file. That seems incorrect -- the trailing '/' ought to require that the item be a directory.

The fs_open (which calls lfs_open) call DOES fail -- correctly in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs fixwe know what is wrongneeds minor versionnew functionality only allowed in minor versions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions