octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63265] rmdir fails to remove directory contai


From: anonymous
Subject: [Octave-bug-tracker] [bug #63265] rmdir fails to remove directory containing read-only files
Date: Sat, 29 Oct 2022 11:27:59 -0400 (EDT)

Follow-up Comment #16, bug #63265 (project octave):

I'm not exactly sure what "unlink" has to do with anything here, anyway I'd
just like to underline again the very fine nuance here. 

The purported problem is not "the read only flag would mean that you _can_
delete a file, just not edit it". 
https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
It is "you cannot touch a read only file, but but you can do whatever you want
(including full nuking) to its root folder".
Any generic function not being able to delete the individual r/o files seems
correct behaviour. 

I'll grant I don't know how matlab handles this then (they seem to query
slightly different FileAttributes than Windows's own rmdir) but it doesn't
seem so obvious that therefore they have to be taking care of unsetting flags
themselves. Surely there's an OS api that is going to comfortably take care of
this? 

And I didn't really feel deceived by the error message (even though I'd
appreciate if you could differentiate the totally unrelated
ERROR_SHARING_VIOLATION case). It would totally make sense *if* I was trying
to delete protected single files. Rmdir entails quite a different concept
though. 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63265>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]