Fix copy in subdirectories
authormpm@selenic.com
Wed, 27 Jul 2005 10:05:12 -0800
changeset 781 26f3d353851f
parent 780 5cb8a3a023b2
child 782 cdb9e95b2fab
Fix copy in subdirectories Spotted by Chad Netzer
mercurial/hg.py
--- a/mercurial/hg.py	Wed Jul 27 09:07:28 2005 -0800
+++ b/mercurial/hg.py	Wed Jul 27 10:05:12 2005 -0800
@@ -959,9 +959,9 @@
 
     def copy(self, source, dest):
         p = self.wjoin(dest)
-        if not os.path.exists(dest):
+        if not os.path.exists(p):
             self.ui.warn("%s does not exist!\n" % dest)
-        elif not os.path.isfile(dest):
+        elif not os.path.isfile(p):
             self.ui.warn("copy failed: %s is not a file\n" % dest)
         else:
             if self.dirstate.state(dest) == '?':