From: wessels <> Date: Tue, 12 May 1998 02:06:19 +0000 (+0000) Subject: Can't rename open files on windows. X-Git-Tag: SQUID_3_0_PRE1~3344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ab2fda102928f65a9fe51d9a8a5c8e3b6cdb0aa;p=thirdparty%2Fsquid.git Can't rename open files on windows. --- diff --git a/src/store_dir.cc b/src/store_dir.cc index 43b5150338..c0b559fc2b 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.66 1998/05/08 23:29:30 wessels Exp $ + * $Id: store_dir.cc,v 1.67 1998/05/11 20:06:19 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -743,6 +743,13 @@ storeDirWriteCleanLogs(int reopen) } safe_free(outbuf); safe_free(outbufoffset); +#ifdef _SQUID_MSWIN_ + /* + * You can't rename open files on Microsoft "operating systems" + * so we close before renaming. + */ + storeDirCloseSwapLogs(); +#endif /* rename */ for (dirn = 0; dirn < N; dirn++) { if (fd[dirn] < 0) @@ -752,7 +759,9 @@ storeDirWriteCleanLogs(int reopen) xstrerror(), new[dirn], cur[dirn]); } } +#ifndef _SQUID_MSWIN_ storeDirCloseSwapLogs(); +#endif if (reopen) storeDirOpenSwapLogs(); stop = squid_curtime;