#include "amrecover.h"
#include "util.h"
+gboolean translate_mode = TRUE;
+
DIR_ITEM *get_dir_list(void);
DIR_ITEM *get_next_dir_item(DIR_ITEM *this);
amfree(item->date);
amfree(item->tape);
amfree(item->path);
+ amfree(item->tpath);
amfree(item);
item = next;
}
next->tape = stralloc(tape);
next->fileno = fileno;
next->path = stralloc(path);
+ next->tpath = translate_octal(g_strdup(path));
next->next = dir_list;
dir_list = next;
continue;
}
tape = s - 1;
- skip_non_whitespace(s, ch);
+ skip_quoted_string(s, ch);
tape_undo = s - 1;
tape_undo_ch = *tape_undo;
*tape_undo = '\0';
+ tape = unquote_string(tape);
if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_OLSD)) {
long long fileno_ = (long long)0;
dir = stralloc(disk_path_slash_dot);
}
add_dir_list_item(date, level, tape, fileno, dir);
+ amfree(tape);
amfree(dir);
}
amfree(disk_path_slash_dot);
fp = stdout;
}
amfree(pager_command);
- i = strlen(disk_path);
+ i = strlen(disk_tpath);
if (i != 1)
- i++; /* so disk_path != "/" */
+ i++; /* so disk_tpath != "/" */
for (item = get_dir_list(); item != NULL; item=get_next_dir_item(item)) {
- quoted = quote_string(item->path + i);
+ quoted = quote_string(item->tpath + i);
g_fprintf(fp, "%s %s\n", item->date, quoted);
amfree(quoted);
}