-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ninja: error: remove(someDirectory) Permission denied. Windows #828
Comments
+1 |
On linux directories are only removed when they're empty. Can the behaviour be changed to recursive removal? Or maybe give the buildscript an opportunity to do clean up before -t clean tries to remove() the directory? |
Same issue here. ninja clean |
CMakeLists.txt I added a CMake project that will throw this error on ninja clean (i cant code ninja files). |
Would be a pretty big change and people might lose their files. See #1334 btw. Let's keep this issue about the Windows-only "Permission denied" error though. |
Microsoft's documentation for |
remove() deletes both files and directories. On Windows we have to select the correct function (DeleteFile will yield Permission Denied when used on a directory) This fixes the behavior of ninja -t clean in some cases ninja-build#828
After running "ninja -t clean" got "Permission denied" while deleting a folder.
MSDN describe stdio.h remove() as function for deleting files (not directories), on the other hand Linux man pages describe it as function for deleting files and folders. Could be a platform specific problem.
Calling _rmdir() (http://msdn.microsoft.com/en-us/library/wt8es881.aspx) do the trick.
The text was updated successfully, but these errors were encountered: