diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2009-07-28 20:11:59 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2009-07-28 20:11:59 (GMT) |
commit | fd90e3e2de2f74d8a7f6ea67109f9c1c543b7b69 (patch) | |
tree | f95dd69faeba71dc830cc0f3b0aa056f4be93c0a | |
parent | 5c38b23cd7b04b06a19a060397ab79335d4a3fb5 (diff) | |
download | fusearchive-fd90e3e2de2f74d8a7f6ea67109f9c1c543b7b69.zip fusearchive-fd90e3e2de2f74d8a7f6ea67109f9c1c543b7b69.tar.gz fusearchive-fd90e3e2de2f74d8a7f6ea67109f9c1c543b7b69.tar.bz2 |
Only add O_CREAT if it was passed initially
-rwxr-xr-x | fusearchive.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fusearchive.py b/fusearchive.py index aad8c0f..035c06b 100755 --- a/fusearchive.py +++ b/fusearchive.py @@ -504,7 +504,11 @@ class FuseArchive(Fuse): # files works (in the create a read-only file for writing case) src = "./tree" + path logging.debug( "Saving fh for " + src ) - nflags = os.O_RDWR | os.O_APPEND | os.O_CREAT + nflags = os.O_RDWR | os.O_APPEND + if flags & os.O_CREAT: + logging.debug( "Adding O_CREAT" ) + nflags = nflags | os.O_CREAT + self.file = os.fdopen( os.open( src, nflags, *mode ), flag2mode( nflags ) ) |