* 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
*/
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;
regex = "\\.[/]*$";
}
else if(strcmp(regex, "[^/]*[/]*$") == 0) { /* "*" */
- //regex =
regex = "([^/.]|\\.[^/]+|[^/.][^/]*)[/]*$";
} else {
/* remove "/" at end of path */
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);
int level = 0;
off_t fileno;
char *ditem_path = NULL;
+ char *qditem_path;
char *l = NULL;
int deleted;
char *s;
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);