@@ -432,7 +432,7 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
432432#endif
433433
434434/* delete old cluster's default tablespace */
435- fprintf (script ,RMDIR_CMD "%s \n" ,fix_path_separator (ctx ,ctx -> old .pgdata ));
435+ fprintf (script ,RMDIR_CMD "\"%s\" \n" ,fix_path_separator (ctx ,ctx -> old .pgdata ));
436436
437437/* delete old cluster's alternate tablespaces */
438438for (tblnum = 0 ;tblnum < ctx -> num_tablespaces ;tblnum ++ )
@@ -456,7 +456,7 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
456456
457457for (dbnum = 0 ;dbnum < ctx -> new .dbarr .ndbs ;dbnum ++ )
458458{
459- fprintf (script ,RMDIR_CMD " %s%s%c%d\n" ,
459+ fprintf (script ,RMDIR_CMD "\" %s%s%c%d\" \n" ,
460460fix_path_separator (ctx ,ctx -> tablespaces [tblnum ]),
461461fix_path_separator (ctx ,ctx -> old .tablespace_suffix ),
462462PATH_SEPARATOR ,ctx -> old .dbarr .dbs [dbnum ].db_oid );
@@ -468,7 +468,7 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
468468 * Simply delete the tablespace directory, which might be ".old"
469469 * or a version-specific subdirectory.
470470 */
471- fprintf (script ,RMDIR_CMD " %s%s\n" ,
471+ fprintf (script ,RMDIR_CMD "\" %s%s\" \n" ,
472472fix_path_separator (ctx ,ctx -> tablespaces [tblnum ]),
473473fix_path_separator (ctx ,ctx -> old .tablespace_suffix ));
474474}