Open GoogleCodeExporter opened 8 years ago
> so, mode is the python name, but you're really interested in fi.flags, i
think.
> if you switch on fi.flags like you do in calls to open you should be okay.
Hmm, right you are. I tried it and it still passes all the tests - wonder why
I didn't do that in the first place? Anyway, fixed in trunk.
> secondly, this method does not support O_EXCL opens, which breaks things
> like using the filesystem for locking.
I'd like to support this but AFAIK we don't offer any such functionality
through the PyFilesystem API.
Original comment by rfkel...@gmail.com
on 27 Jan 2012 at 6:58
so, in base.py:flags_to_mode, it appears you recently started explicitly
rejecting O_EXCL, but i don't see any reason not to just pass an x in the mode
string through, even if it's nonstandard.
i realize a design goal is to support as many filesystems and operating systems
as possible, but i don't think it's necessary to deliberately implement only
the least common denominator to do so. it would be nice to pass things through
to the fs.base.FS implementation if that specific feature is supported by it.
fwiw, you will only have to deal with O_EXCL on fuse 'create' calls. a normal
open will never see it.
Original comment by jtolds
on 27 Jan 2012 at 5:05
Original issue reported on code.google.com by
jtolds
on 26 Jan 2012 at 10:05