projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
531cc78
)
Add 'only_files' option to the overwrite field in Adder
author
kevan
<kevan@isnotajoke.com>
Sat, 18 Jul 2009 03:00:10 +0000
(20:00 -0700)
committer
kevan
<kevan@isnotajoke.com>
Sat, 18 Jul 2009 03:00:10 +0000
(20:00 -0700)
src/allmydata/dirnode.py
patch
|
blob
|
history
diff --git
a/src/allmydata/dirnode.py
b/src/allmydata/dirnode.py
index b06836f323c5d8eec3a8d5b43c6e76a091b8c315..117c80e451189160625e100e00a553f1d7e1cc3d 100644
(file)
--- a/
src/allmydata/dirnode.py
+++ b/
src/allmydata/dirnode.py
@@
-98,6
+98,9
@@
class Adder:
if name in children:
if not self.overwrite:
raise ExistingChildError("child '%s' already exists" % name)
+
+ if self.overwrite == "only_files" and IDirectoryNode.providedBy(children[name][0]):
+ raise ExistingChildError("child '%s' already exists" % name)
metadata = children[name][1].copy()
else:
metadata = {"ctime": now,