mercurial/util.py
branchstable
changeset 13305 035684c6b69a
parent 13225 e3bf16703e26
child 13313 0c493e5ce8e9
--- a/mercurial/util.py	Sat Jan 22 16:15:40 2011 +0100
+++ b/mercurial/util.py	Wed Jan 26 19:14:30 2011 +0100
@@ -913,6 +913,8 @@
                     # shares if the file is open.
                     fd = open(f)
                     nlink = nlinks(f)
+                    if nlink < 1:
+                        nlink = 2 # force mktempcopy (issue1922)
                     fd.close()
             except (OSError, IOError):
                 nlink = 0