mercurial/patch.py
branchstable
changeset 12344 b6173aee4a47
parent 12341 aca8b10bca6e
child 12345 e0ee3e822a9a
child 12574 77600d697d0e
--- a/mercurial/patch.py	Mon Sep 20 21:46:39 2010 +0200
+++ b/mercurial/patch.py	Mon Sep 20 21:46:56 2010 +0200
@@ -1230,7 +1230,7 @@
             islink, isexec = gp.mode
             dst = repo.wjoin(gp.path)
             # patch won't create empty files
-            if gp.op == 'ADD' and not os.path.exists(dst):
+            if gp.op == 'ADD' and not os.path.lexists(dst):
                 flags = (isexec and 'x' or '') + (islink and 'l' or '')
                 repo.wwrite(gp.path, '', flags)
             util.set_flags(dst, islink, isexec)