Bruce Momjian wrote:
OK, applied.  I moved the funciton into port/dirmod.c and cleaned up the
interface for Win32.

Would someone test this on Win32 in case I broke something?

Yes, something's broken, see patch.

Second, HAVE_SYMLINK must be defined somewhere (configure?).

Third, a junction is a directory, not a file, so DROP tablespace must use rmdir, not unlink to remove the junction; see my original patch.


Index: dirmod.c
RCS file: /projects/cvsroot/pgsql-server/src/port/dirmod.c,v
retrieving revision 1.14
diff -u -r1.14 dirmod.c
--- dirmod.c	7 Aug 2004 21:48:09 -0000	1.14
+++ dirmod.c	7 Aug 2004 22:31:25 -0000
@@ -153,9 +153,9 @@
 	HANDLE dirhandle;
 	DWORD len;
-	char *p = nativeTarget;
 	char buffer[MAX_PATH*sizeof(WCHAR) + sizeof(REPARSE_JUNCTION_DATA_BUFFER)];
 	char nativeTarget[MAX_PATH];
+	char *p = nativeTarget;
 	CreateDirectory(newpath, 0);
@@ -203,9 +203,12 @@
 					  NULL, GetLastError(), 
 					  (LPSTR)&msg, 0, NULL );
+#ifdef FRONTEND
+                fprintf(stderr, "Error setting junction for %s: %s", nativeTarget, msg);
 		ereport(ERROR, (errcode_for_file_access(),
 			errmsg("Error setting junction for %s: %s", nativeTarget, msg)));

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to