changeset 10896:2d61b612a09d stable

checkexec: use an explicit prefix for the temporary file
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 13 Apr 2010 21:54:59 +0200
parents 9e4d120e3c32
children 5589110e9170 997173e49115
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Apr 12 21:19:53 2010 +0200
+++ b/mercurial/util.py	Tue Apr 13 21:54:59 2010 +0200
@@ -664,7 +664,7 @@
 
     try:
         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
-        fh, fn = tempfile.mkstemp("", "", path)
+        fh, fn = tempfile.mkstemp(dir=path, prefix='hg-checkexec-')
         try:
             os.close(fh)
             m = os.stat(fn).st_mode & 0777