Imported Upstream version 2.5.1p3
[debian/amanda] / recover-src / display_commands.c
index 90e181674afc385ea96f3629be90ed1b72b12927..1a5b63876c42173cb0b63c0d873d226cea3e18b1 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: display_commands.c,v 1.22 2006/07/05 19:42:17 martinea Exp $
+ * $Id: display_commands.c,v 1.22.2.1 2006/12/22 15:10:26 martinea Exp $
  *
  * implements the directory-display related commands in amrecover
  */
@@ -143,6 +143,7 @@ suck_dir_list_from_server(void)
     char *disk_path_slash_dot = NULL;
     char *s;
     int ch;
+    char *qdisk_path;
 
     if (disk_path == NULL) {
        printf("Directory must be set before getting listing\n");
@@ -155,7 +156,9 @@ suck_dir_list_from_server(void)
 
     clear_dir_list();
 
-    cmd = stralloc2("OLSD ", disk_path);
+    qdisk_path = quote_string(disk_path);
+    cmd = stralloc2("OLSD ", qdisk_path);
+    amfree(qdisk_path);
     if (send_command(cmd) == -1) {
        amfree(cmd);
        amfree(disk_path_slash);