mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-23 01:08:53 +00:00
Add 'only_files' option to the overwrite field in Adder
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user