From 6bfab2de084cd13a5d62b02b8e8de910bfb88a01 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Sun, 14 Dec 2014 23:53:35 -0500 Subject: [PATCH] BUG: Allow for the possibility that to_path is empty string. This is a legal input for representing the root directory. --- IPython/html/services/contents/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/services/contents/manager.py b/IPython/html/services/contents/manager.py index 06edfcc02..82b87ade8 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)