1010 *Win32 (NT, Win2k, XP).replace() doesn't work on Win95/98/Me.
1111 *
1212 * IDENTIFICATION
13- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.37 2005/03/24 02:11:20 tgl Exp $
13+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.38 2005/08/02 15:14:47 tgl Exp $
1414 *
1515 *-------------------------------------------------------------------------
1616 */
@@ -281,10 +281,10 @@ pgsymlink(const char *oldpath, const char *newpath)
281281#ifndef FRONTEND
282282ereport (ERROR ,
283283(errcode_for_file_access (),
284- errmsg ("Error setting junction for%s : %s" ,
284+ errmsg ("could not set junction for\"%s\" : %s" ,
285285nativeTarget ,msg )));
286286#else
287- fprintf (stderr ,_ ("Error setting junction for%s : %s\n" ),
287+ fprintf (stderr ,_ ("could not set junction for\"%s\" : %s\n" ),
288288nativeTarget ,msg );
289289#endif
290290LocalFree (msg );
@@ -408,7 +408,8 @@ fnames_cleanup(char **filenames)
408408bool
409409rmtree (char * path ,bool rmtopdir )
410410{
411- char filepath [MAXPGPATH ];
411+ char pathbuf [MAXPGPATH ];
412+ char * filepath ;
412413char * * filenames ;
413414char * * filename ;
414415struct stat statbuf ;
@@ -423,6 +424,7 @@ rmtree(char *path, bool rmtopdir)
423424return false;
424425
425426/* now we have the names we can start removing things */
427+ filepath = pathbuf ;
426428
427429for (filename = filenames ;* filename ;filename ++ )
428430{
@@ -450,7 +452,8 @@ rmtree(char *path, bool rmtopdir)
450452
451453if (rmtopdir )
452454{
453- if (rmdir (path )!= 0 )
455+ filepath = path ;
456+ if (rmdir (filepath )!= 0 )
454457gotoreport_and_fail ;
455458}
456459