Skip to content

Deleting directories on Windows does not work for paths with trailing slash #13

@thasmo

Description

@thasmo

After upgrading to del-cli@3 the following behavior occurs:


Command: del-cli dir/subdir/ (Note the trailing slash)
Expectation: dir/subdir/ gets deleted.
Outcome: dir/subdir/ is not deleted.

Command: del-cli dir/subdir (Note the absence of the trailing slash)
Expectation: dir/subdir/ gets deleted.
Outcome: dir/subdir/ gets deleted.


This behavior appears to have started with the switch to del@5 using fast-glob but after looking into the fast-glob docs I'm not sure there is even option or anything related to control this behavior. (Using del-cli@2 does behave the same for both commands.)

tbh I thought I report it here first because I encountered it using del-cli. If you believe this is a problem with fast-glob feel free to close the issue and I will create another issue for fast-glob.

Thanks a lot! 👍

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