[master] 3522896 Create the temporary files in the same dir

Federico G. Schwindt fgsch at lodoss.net
Fri May 27 10:00:09 CEST 2016


commit 3522896b8ad857430dc6a9d18662edad84040d67
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 bd4f99c..4ee6341 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -914,10 +914,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)
@@ -943,7 +943,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