Skip to content

Commit

Permalink
forwarding create() to open() does not work, implement it
Browse files Browse the repository at this point in the history
  • Loading branch information
bertwesarg committed Aug 20, 2010
1 parent 69ef7be commit c7e98b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion svnpropfs.py
Expand Up @@ -45,7 +45,15 @@ def chown(self, path, uid, gid):
return os.chown(path, uid, gid)

def create(self, path, mode):
return open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, mode)
dirpath = os.path.dirname(path)
name = os.path.basename(path)
m = self.propregex.match(name)
if m == None:
self.fd += 1
self.map_to_os_fd[self.fd] = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, mode)
return self.fd
else:
raise OSError(ENOENT, '')

def flush(self, path, fh):
if fh in self.map_to_os_fd:
Expand Down

0 comments on commit c7e98b4

Please sign in to comment.