BUG: Allow for the possibility that to_path is empty string.

This is a legal input for representing the root directory.
Scott Sanderson 11 years ago committed by Min RK
parent 44805b94db
commit 6bfab2de08

@ -362,7 +362,7 @@ class ContentsManager(LoggingConfigurable):
if model['type'] == 'directory':
raise HTTPError(400, "Can't copy directories")
if not to_path:
if to_path is None:
to_path = from_dir
if self.dir_exists(to_path):
name = copy_pat.sub(u'.', from_name)

Loading…
Cancel
Save