File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.74 2001/03/22 03:59:45 momjian Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.75 2001/04/03 02:31:52 tgl Exp $
1111 *
1212 * NOTES:
1313 *
@@ -112,7 +112,7 @@ typedef struct vfd
112112 long seekPos ; /* current logical file position */
113113 char * fileName ; /* name of file, or NULL for unused VFD */
114114 /* NB: fileName is malloc'd, and must be free'd when closing the VFD */
115- int fileFlags ; /* open(2) flags for opening the file */
115+ int fileFlags ; /* open(2) flags for (re) opening the file */
116116 int fileMode ; /* mode to pass to open(2) */
117117} Vfd ;
118118
@@ -681,8 +681,10 @@ fileNameOpenFile(FileName fileName,
681681 vfdP -> fileName = malloc (strlen (fileName ) + 1 );
682682 strcpy (vfdP -> fileName , fileName );
683683
684- vfdP -> fileFlags = fileFlags & ~(O_TRUNC | O_EXCL );
684+ /* Saved flags are adjusted to be OK for re-opening file */
685+ vfdP -> fileFlags = fileFlags & ~(O_CREAT | O_TRUNC | O_EXCL );
685686 vfdP -> fileMode = fileMode ;
687+
686688 vfdP -> seekPos = 0 ;
687689
688690 /*
You can’t perform that action at this time.
0 commit comments