@@ -681,7 +681,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
681681#endif
682682
683683 /* delete old cluster's default tablespace */
684- fprintf (script , RMDIR_CMD " %s \n" , fix_path_separator (old_cluster .pgdata ));
684+ fprintf (script , RMDIR_CMD " \"%s\" \n" , fix_path_separator (old_cluster .pgdata ));
685685
686686 /* delete old cluster's alternate tablespaces */
687687 for (tblnum = 0 ; tblnum < os_info .num_old_tablespaces ; tblnum ++ )
@@ -705,7 +705,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
705705
706706 for (dbnum = 0 ; dbnum < old_cluster .dbarr .ndbs ; dbnum ++ )
707707 {
708- fprintf (script , RMDIR_CMD " %s%s%c%d\n" ,
708+ fprintf (script , RMDIR_CMD " \" %s%s%c%d\" \n" ,
709709 fix_path_separator (os_info .old_tablespaces [tblnum ]),
710710 fix_path_separator (old_cluster .tablespace_suffix ),
711711 PATH_SEPARATOR , old_cluster .dbarr .dbs [dbnum ].db_oid );
@@ -717,7 +717,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
717717 * Simply delete the tablespace directory, which might be ".old"
718718 * or a version-specific subdirectory.
719719 */
720- fprintf (script , RMDIR_CMD " %s%s\n" ,
720+ fprintf (script , RMDIR_CMD " \" %s%s\" \n" ,
721721 fix_path_separator (os_info .old_tablespaces [tblnum ]),
722722 fix_path_separator (old_cluster .tablespace_suffix ));
723723 }
0 commit comments