mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
Add 'only_files' option to the overwrite field in Adder
This commit is contained in:
parent
531cc7899f
commit
c476c66b0e
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user