Issue 20647 - rmdirRecurse and remove cannot remove readonly files on windows
Summary: rmdirRecurse and remove cannot remove readonly files on windows
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-07 19:45 UTC by Jonathan Marler
Modified: 2024-12-01 16:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan Marler 2020-03-07 19:45:44 UTC
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 Jonathan Marler 2020-03-07 20:20:25 UTC
discussion here: https://forum.dlang.org/post/bbuvyirphcogtclachci@forum.dlang.org
Comment 2 dlangBugzillaToGithub 2024-12-01 16:36:28 UTC
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