1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Hmm, absolute pathnames for the copy makes sense. I'll whip up that

patch in a second. Should be sufficent to just make sure the first
character is a '/', right?

Ross J. Reedstrom
This commit is contained in:
Bruce Momjian
2000-03-23 21:38:58 +00:00
parent b2d867fb08
commit 4ddc50dffa
2 changed files with 85 additions and 13 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.102 2000/03/09 05:00:23 inoue Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.103 2000/03/23 21:38:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -348,6 +348,11 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
mode_t oumask; /* Pre-existing umask value */
oumask = umask((mode_t) 022);
if (*filename != '/')
elog(ERROR, "Relative path not allowed for server side"
" COPY command.");
#ifndef __CYGWIN32__
fp = AllocateFile(filename, "w");
#else