diff mercurial/patch.py @ 12344:b6173aee4a47 stable

Use lexists() instead of exists() where appropriate
author Patrick Mezard <pmezard@gmail.com>
date Mon, 20 Sep 2010 21:46:56 +0200
parents aca8b10bca6e
children e0ee3e822a9a 77600d697d0e
line wrap: on
line diff
--- 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)