Skip to content

max path length is confused with max filename length when validating/sanitizing filepaths #51

@7x11x13

Description

@7x11x13

Code to reproduce:

from pathvalidate import validate_filepath

p = "./" + "a" * 280
validate_filepath(p, platform="Linux")

This runs with no error. The expected output would be an error stating that the length of the filename is too long (280 > 255). I think the file path sanitizer should take two max length args: one for max filename length and one for max filepath length.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions