*/
#include "amanda.h"
+#include "match.h"
#include "util.h"
#include "amrecover.h"
if (strcmp(disk_path, "/") == 0)
path_on_disk = stralloc2("/", regex_path);
else {
- char *clean_disk_path = clean_regex(disk_path);
+ char *clean_disk_path = clean_regex(disk_path, 0);
path_on_disk = vstralloc(clean_disk_path, "/", regex_path, NULL);
amfree(clean_disk_path);
}
if (strcmp(disk_path, "/") == 0)
path_on_disk = stralloc2("/", regex);
else {
- char *clean_disk_path = clean_regex(disk_path);
+ char *clean_disk_path = clean_regex(disk_path, 0);
path_on_disk = vstralloc(clean_disk_path, "/", regex, NULL);
amfree(clean_disk_path);
}
if(dir[strlen(dir)-1] == '/')
dir[strlen(dir)-1] = '\0'; /* remove last / */
/* remove everything before the last / */
- dir1 = rindex(dir,'/');
+ dir1 = strrchr(dir,'/');
if (dir1) {
dir1++;
dir2 = stralloc(dir1);