X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=recover-src%2Fextract_list.c;fp=recover-src%2Fextract_list.c;h=4cd35b22e5e23cf701d7e8ff02f92f25fb426392;hb=310f09c0f55a2fb6f3f3746d6ded20099792b773;hp=67c02d1bd10325a8c5ee358ef6fbeb61952ee95e;hpb=13d6d10aa48f1dfb956ccff2f72dbaa255073472;p=debian%2Famanda diff --git a/recover-src/extract_list.c b/recover-src/extract_list.c index 67c02d1..4cd35b2 100644 --- a/recover-src/extract_list.c +++ b/recover-src/extract_list.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: extract_list.c,v 1.117 2006/08/24 01:57:15 paddy_s Exp $ + * $Id: extract_list.c,v 1.117.2.2 2006/12/22 15:10:26 martinea Exp $ * * implements the "extract" command in amrecover */ @@ -743,6 +743,7 @@ add_file( ssize_t j; char *dir, *dir_undo, dir_undo_ch = '\0'; char *ditem_path = NULL; + char *qditem_path = NULL; char *l = NULL; int added; char *s, *fp, *quoted; @@ -762,7 +763,6 @@ add_file( regex = "\\.[/]*$"; } else if(strcmp(regex, "[^/]*[/]*$") == 0) { /* "*" */ - //regex = regex = "([^/.]|\\.[^/]+|[^/.][^/]*)[/]*$"; } else { /* remove "/" at end of path */ @@ -810,7 +810,9 @@ add_file( ditem_path = newstralloc(ditem_path, ditem->path); clean_pathname(ditem_path); - cmd = stralloc2("ORLD ", ditem_path); + qditem_path = quote_string(ditem_path); + cmd = stralloc2("ORLD ", qditem_path); + amfree(qditem_path); if(send_command(cmd) == -1) { amfree(cmd); amfree(ditem_path); @@ -1063,6 +1065,7 @@ delete_file( int level = 0; off_t fileno; char *ditem_path = NULL; + char *qditem_path; char *l = NULL; int deleted; char *s; @@ -1128,7 +1131,9 @@ delete_file( ditem_path = newstralloc(ditem_path, ditem->path); clean_pathname(ditem_path); - cmd = stralloc2("ORLD ", ditem_path); + qditem_path = quote_string(ditem_path); + cmd = stralloc2("ORLD ", qditem_path); + amfree(qditem_path); if(send_command(cmd) == -1) { amfree(cmd); amfree(ditem_path);