Frontend created and rewritten a few times, with some backend fixes #1
|
@ -75,6 +75,7 @@ class Cp(ControlBase):
|
||||||
if not dst.is_dir():
|
if not dst.is_dir():
|
||||||
raise BadRequest("The destination must be a directory")
|
raise BadRequest("The destination must be a directory")
|
||||||
for p in sel:
|
for p in sel:
|
||||||
|
if p.is_dir():
|
||||||
# Note: copies as dst rather than in dst unless name is appended.
|
# Note: copies as dst rather than in dst unless name is appended.
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
p,
|
p,
|
||||||
|
@ -82,6 +83,8 @@ class Cp(ControlBase):
|
||||||
dirs_exist_ok=True,
|
dirs_exist_ok=True,
|
||||||
ignore_dangling_symlinks=True,
|
ignore_dangling_symlinks=True,
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
shutil.copy2(p, dst)
|
||||||
|
|
||||||
|
|
||||||
ControlTypes = MkDir | Rename | Rm | Mv | Cp
|
ControlTypes = MkDir | Rename | Rm | Mv | Cp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user