mercurial/commands.py
changeset 1314 d37a46859acd
parent 1313 1cc7c0cbc30b
child 1315 32f6cae83db7
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -622,9 +622,10 @@ def clone(ui, source, dest=None, **opts)
     if opts['remotecmd']:
         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
 
-    d = Dircleanup(dest)
     if not os.path.exists(source):
         source = ui.expandpath(source)
+
+    d = Dircleanup(dest)
     abspath = source
     other = hg.repository(ui, source)