* as a service.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.17 2006/03/05 15:59:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.18 2006/07/18 22:36:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
snprintf(fromfile, MAXPGPATH, "%s/%s", fromdir, xlde->d_name);
snprintf(tofile, MAXPGPATH, "%s/%s", todir, xlde->d_name);
- if (stat(fromfile, &fst) < 0)
+ if (lstat(fromfile, &fst) < 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not stat file \"%s\": %m", fromfile)));
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.42 2006/03/05 15:59:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.43 2006/07/18 22:36:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
snprintf(filepath, MAXPGPATH, "%s/%s", path, *filename);
- if (stat(filepath, &statbuf) != 0)
+ if (lstat(filepath, &statbuf) != 0)
goto report_and_fail;
if (S_ISDIR(statbuf.st_mode))