10
10
*Win32 (NT, Win2k, XP).replace() doesn't work on Win95/98/Me.
11
11
*
12
12
* 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 $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -281,10 +281,10 @@ pgsymlink(const char *oldpath, const char *newpath)
281
281
#ifndef FRONTEND
282
282
ereport (ERROR ,
283
283
(errcode_for_file_access (),
284
- errmsg ("Error setting junction for%s : %s" ,
284
+ errmsg ("could not set junction for\"%s\" : %s" ,
285
285
nativeTarget ,msg )));
286
286
#else
287
- fprintf (stderr ,_ ("Error setting junction for%s : %s\n" ),
287
+ fprintf (stderr ,_ ("could not set junction for\"%s\" : %s\n" ),
288
288
nativeTarget ,msg );
289
289
#endif
290
290
LocalFree (msg );
@@ -408,7 +408,8 @@ fnames_cleanup(char **filenames)
408
408
bool
409
409
rmtree (char * path ,bool rmtopdir )
410
410
{
411
- char filepath [MAXPGPATH ];
411
+ char pathbuf [MAXPGPATH ];
412
+ char * filepath ;
412
413
char * * filenames ;
413
414
char * * filename ;
414
415
struct stat statbuf ;
@@ -423,6 +424,7 @@ rmtree(char *path, bool rmtopdir)
423
424
return false;
424
425
425
426
/* now we have the names we can start removing things */
427
+ filepath = pathbuf ;
426
428
427
429
for (filename = filenames ;* filename ;filename ++ )
428
430
{
@@ -450,7 +452,8 @@ rmtree(char *path, bool rmtopdir)
450
452
451
453
if (rmtopdir )
452
454
{
453
- if (rmdir (path )!= 0 )
455
+ filepath = path ;
456
+ if (rmdir (filepath )!= 0 )
454
457
gotoreport_and_fail ;
455
458
}
456
459