[4.1] 729c2c5 Create the temporary files in the same dir
Lasse Karstensen
lkarsten at varnish-software.com
Tue Jun 14 12:58:08 CEST 2016
commit 729c2c598ca5c4caf101e3e8f76074e96781367d
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Fri May 27 08:46:23 2016 +0100
Create the temporary files in the same dir
Rename will fail across different mount points.
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index c2b1977..d95fb71 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -919,10 +919,10 @@ def runmain(inputvcc, rstdir, outputprefix):
#######################################################################
# Parsing done, now process
#
- fd_cfile, fn_cfile = mkstemp()
+ fd_cfile, fn_cfile = mkstemp(dir='.')
cfile = fdopen(fd_cfile, "w")
- fd_headerfile, fn_headerfile = mkstemp()
+ fd_headerfile, fn_headerfile = mkstemp(dir='.')
headerfile = fdopen(fd_headerfile, "w")
write_c_file_warning(cfile)
@@ -948,7 +948,7 @@ def runmain(inputvcc, rstdir, outputprefix):
headerfile.close()
for suf in ("", ".man"):
- fd, fn_fp = mkstemp()
+ fd, fn_fp = mkstemp(dir='.')
fp = fdopen(fd, "w")
write_rst_file_warning(fp)
More information about the varnish-commit
mailing list