Bug 20647 – rmdirRecurse and remove cannot remove readonly files on windows

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2020-03-07T19:45:44Z
Last change time
2024-12-01T16:36:28Z
Assigned to
No Owner
Creator
Jonathan Marler
Moved to GitHub: phobos#10410 →

Comments

Comment #0 by johnnymarler — 2020-03-07T19:45:44Z
It would be helpful for phobos to provide a way to remove readonly files on windows. A common use case is when removing git repositories. On windows, git creates readonly files inside its ".git" sub-directory. This means phobos' `remove` and `rmdirRecurse` functions will fail when trying to delete directories that contain git repositories. To remove readonly files on windows, you must remove the READONLY file attribute. I'd like to see phobos provide functionality to remove files and directories with readonly files in them.
Comment #1 by johnnymarler — 2020-03-07T20:20:25Z
Comment #2 by robert.schadek — 2024-12-01T16:36:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10410 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB