From fd90e3e2de2f74d8a7f6ea67109f9c1c543b7b69 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Tue, 28 Jul 2009 13:11:59 -0700 Subject: Only add O_CREAT if it was passed initially 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 ) ) -- cgit v0.10.2