Index: src/backend/commands/dbcommands.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/commands/dbcommands.c,v retrieving revision 1.110 diff -c -c -r1.110 dbcommands.c *** src/backend/commands/dbcommands.c 27 Jan 2003 00:46:41 -0000 1.110 --- src/backend/commands/dbcommands.c 4 Apr 2003 14:49:19 -0000 *************** *** 302,308 **** --- 302,312 ---- } /* Copy the template database to the new location */ + #ifndef WIN32 snprintf(buf, sizeof(buf), "cp -r '%s' '%s'", src_loc, target_dir); + #else + snprintf(buf, sizeof(buf), "xcopy /e /i /q '%s' '%s'", src_loc, target_dir); + #endif if (system(buf) != 0) { *************** *** 751,757 **** --- 755,765 ---- } } + #ifndef WIN32 snprintf(buf, sizeof(buf), "rm -rf '%s'", target_dir); + #else + snprintf(buf, sizeof(buf), "rmdir /s /q \"%s\"", target_dir); + #endif if (system(buf) != 0) { Index: src/bin/psql/command.c =================================================================== RCS file: /cvsroot/pgsql-server/src/bin/psql/command.c,v retrieving revision 1.94 diff -c -c -r1.94 command.c *** src/bin/psql/command.c 20 Mar 2003 06:43:35 -0000 1.94 --- src/bin/psql/command.c 4 Apr 2003 14:49:37 -0000 *************** *** 66,73 **** static bool do_connect(const char *new_dbname, const char *new_user); static bool do_shell(const char *command); - - /*---------- * HandleSlashCmds: * --- 66,71 ---- *************** *** 1515,1521 **** sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1); if (!sys) return false; ! sprintf(sys, "exec %s '%s'", editorName, fname); result = system(sys); if (result == -1) psql_error("could not start editor %s\n", editorName); --- 1513,1523 ---- sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1); if (!sys) return false; ! sprintf(sys, ! #ifndef WIN32 ! "exec " ! #endif ! "%s '%s'", editorName, fname); result = system(sys); if (result == -1) psql_error("could not start editor %s\n", editorName); *************** *** 1944,1950 **** else exit(EXIT_FAILURE); } ! sprintf(sys, "exec %s", shellName); result = system(sys); free(sys); } --- 1946,1956 ---- else exit(EXIT_FAILURE); } ! sprintf(sys, ! #ifndef WIN32 ! "exec " ! #endif ! "%s", shellName); result = system(sys); free(sys); }