1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Add Win32 path handling for / vs. \ and drive letters.

This commit is contained in:
Bruce Momjian
2003-04-04 20:42:13 +00:00
parent 9bad936f67
commit d46e643822
22 changed files with 147 additions and 88 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.190 2003/03/27 16:51:27 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.191 2003/04/04 20:42:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -476,7 +476,7 @@ DoCopy(const CopyStmt *stmt)
* Prevent write to relative path ... too easy to shoot
* oneself in the foot by overwriting a database file ...
*/
if (filename[0] != '/')
if (!is_absolute_path(filename))
elog(ERROR, "Relative path not allowed for server side"
" COPY command");