|
Boost : |
From: Zsolt Rizsanyi (rizsanyi_at_[hidden])
Date: 2003-06-22 10:54:15
On Sunday 22 June 2003 14.02, John Maddock wrote:
> Beman,
>
> I'm having a problem with the filesystem lib and read only files -
> basically if I copy a read only file then the result is read only, fair
> enough. However if I then try and overwrite that file with another file
> copy it throws because of the read only status of the target file, still
> fair enough. So then I try and remove the target file with remove first,
> but that throws as well because the file "not accessible" i.e. read only!
> So - how can I get rid of a read only file? At present it seems to be
> impossible?
The deletion of a file should depend on permissions of the directory and not
of the file!
That way if you could write the file (you have write permissions on the dir),
then you can delete it, regardless of the permissions of the file.
That's how it works on *nix.
So IMHO this is the bug in the filesystem lib.
(Note: I did not check the filesystem lib code, nor do I use it. But I have
read the lib documentation :)
Regards
Zsolt
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk