@@ -528,7 +528,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
528
528
#endif
529
529
530
530
/* delete old cluster's default tablespace */
531
- fprintf (script ,RMDIR_CMD "%s \n" ,fix_path_separator (old_cluster .pgdata ));
531
+ fprintf (script ,RMDIR_CMD "\"%s\" \n" ,fix_path_separator (old_cluster .pgdata ));
532
532
533
533
/* delete old cluster's alternate tablespaces */
534
534
for (tblnum = 0 ;tblnum < os_info .num_old_tablespaces ;tblnum ++ )
@@ -550,7 +550,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
550
550
PATH_SEPARATOR );
551
551
552
552
for (dbnum = 0 ;dbnum < old_cluster .dbarr .ndbs ;dbnum ++ )
553
- fprintf (script ,RMDIR_CMD " %s%c%d\n" ,
553
+ fprintf (script ,RMDIR_CMD "\" %s%c%d\" \n" ,
554
554
fix_path_separator (os_info .old_tablespaces [tblnum ]),
555
555
PATH_SEPARATOR ,old_cluster .dbarr .dbs [dbnum ].db_oid );
556
556
}
@@ -562,7 +562,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
562
562
* Simply delete the tablespace directory, which might be ".old"
563
563
* or a version-specific subdirectory.
564
564
*/
565
- fprintf (script ,RMDIR_CMD " %s%s\n" ,
565
+ fprintf (script ,RMDIR_CMD "\" %s%s\" \n" ,
566
566
fix_path_separator (os_info .old_tablespaces [tblnum ]),
567
567
fix_path_separator (suffix_path ));
568
568
pfree (suffix_path );