From ce197ddbaf611d98822a4897c7f1c534f7510b28 2014-12-17 19:38:45 From: Scott Sanderson Date: 2014-12-17 19:38:45 Subject: [PATCH] BUG: Allow for the possibility that to_path is empty string. This is a legal input for representing the root directory. --- diff --git a/IPython/html/services/contents/manager.py b/IPython/html/services/contents/manager.py index 06edfcc..82b87ad 100644 --- a/IPython/html/services/contents/manager.py +++ b/IPython/html/services/contents/manager.py @@ -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)