File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
9
* 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 $
11
11
*
12
12
* NOTES:
13
13
*
@@ -112,7 +112,7 @@ typedef struct vfd
112
112
long seekPos ; /* current logical file position */
113
113
char * fileName ; /* name of file, or NULL for unused VFD */
114
114
/* 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 */
116
116
int fileMode ; /* mode to pass to open(2) */
117
117
} Vfd ;
118
118
@@ -681,8 +681,10 @@ fileNameOpenFile(FileName fileName,
681
681
vfdP -> fileName = malloc (strlen (fileName ) + 1 );
682
682
strcpy (vfdP -> fileName , fileName );
683
683
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 );
685
686
vfdP -> fileMode = fileMode ;
687
+
686
688
vfdP -> seekPos = 0 ;
687
689
688
690
/*
You can’t perform that action at this time.
0 commit comments