From: Jeffrey Altman Date: Thu, 20 Jan 2011 07:01:38 +0000 (-0500) Subject: vol: use correct file name base for temporary file X-Git-Tag: upstream/1.8.0_pre1^2~4251 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=01fc5d0577409c889ca5ad6f3bc1d624138922bc;p=packages%2Fo%2Fopenafs.git vol: use correct file name base for temporary file Inconsistent use of temporary file name bases resulted in the temporary files never being deleted. Change-Id: I0be59282488bb2db0f1b7b5200df5bd6ac285711 Reviewed-on: http://gerrit.openafs.org/3705 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 14193a2f8..c694db2eb 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -1166,7 +1166,7 @@ GetInodeSummary(struct SalvInfo *salvinfo, FILE *inodeFile, VolumeId singleVolum tdir = (tmpdir ? tmpdir : part); #ifdef AFS_NT40_ENV (void)_putenv("TMP="); /* If "TMP" is set, then that overrides tdir. */ - (void)strcpy(summaryFileName, _tempnam(tdir, "salvage.temp")); + (void)strcpy(summaryFileName, _tempnam(tdir, "salvage.temp.")); #else (void)afs_snprintf(summaryFileName, sizeof summaryFileName, "%s" OS_DIRSEP "salvage.temp.%d", tdir, getpid());