@@ -483,7 +483,7 @@ create_script_for_old_cluster_deletion(
483483#endif
484484
485485 /* delete old cluster's default tablespace */
486- fprintf (script , RMDIR_CMD " %s \n" , fix_path_separator (old_cluster .pgdata ));
486+ fprintf (script , RMDIR_CMD " \"%s\" \n" , fix_path_separator (old_cluster .pgdata ));
487487
488488 /* delete old cluster's alternate tablespaces */
489489 for (tblnum = 0 ; tblnum < os_info .num_tablespaces ; tblnum ++ )
@@ -507,7 +507,7 @@ create_script_for_old_cluster_deletion(
507507
508508 for (dbnum = 0 ; dbnum < new_cluster .dbarr .ndbs ; dbnum ++ )
509509 {
510- fprintf (script , RMDIR_CMD " %s%s%c%d\n" ,
510+ fprintf (script , RMDIR_CMD " \" %s%s%c%d\" \n" ,
511511 fix_path_separator (os_info .tablespaces [tblnum ]),
512512 fix_path_separator (old_cluster .tablespace_suffix ),
513513 PATH_SEPARATOR , old_cluster .dbarr .dbs [dbnum ].db_oid );
@@ -519,7 +519,7 @@ create_script_for_old_cluster_deletion(
519519 * Simply delete the tablespace directory, which might be ".old"
520520 * or a version-specific subdirectory.
521521 */
522- fprintf (script , RMDIR_CMD " %s%s\n" ,
522+ fprintf (script , RMDIR_CMD " \" %s%s\" \n" ,
523523 fix_path_separator (os_info .tablespaces [tblnum ]),
524524 fix_path_separator (old_cluster .tablespace_suffix ));
525525 }
0 commit comments