summaryrefslogtreecommitdiffabout
path: root/src/vtab.c
Side-by-side diff
Diffstat (limited to 'src/vtab.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/vtab.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/vtab.c b/src/vtab.c
index 2f8a85e..cec6fc0 100644
--- a/src/vtab.c
+++ b/src/vtab.c
@@ -21,19 +21,19 @@ struct virt_tab_reg
char *scheme;
struct virt_tab vtab;
};
static struct virt_tab_reg reg[] = {
{ "file",
- { dir_test_url, dir_move_file, dir_archive_file, dir_symlink_file,
- dir_rmsymlink_file } },
+ { dir_get_path, dir_test_url, dir_move_file, dir_archive_file,
+ dir_symlink_file, dir_rmsymlink_file } },
{ "dir",
- { dir_test_url, dir_move_file, dir_archive_file, dir_symlink_file,
- dir_rmsymlink_file } },
+ { dir_get_path, dir_test_url, dir_move_file, dir_archive_file,
+ dir_symlink_file, dir_rmsymlink_file } },
{ "null",
- { NULL, null_move_file, null_archive_file, null_symlink_file,
+ { NULL, NULL, null_move_file, null_archive_file, null_symlink_file,
null_rmsymlink_file } },
{ NULL }
};
int
url_to_vtab (mu_url_t url, struct virt_tab *vtab)
@@ -50,12 +50,20 @@ url_to_vtab (mu_url_t url, struct virt_tab *vtab)
return 0;
}
return 1;
}
+const char *
+get_path (struct spool *sp)
+{
+ if (!sp->vtab.get_path)
+ return NULL;
+ return sp->vtab.get_path (sp);
+}
+
int
move_file (struct file_triplet *trp, enum file_type file_id)
{
int rc = trp->spool->vtab.move_file (trp, file_id);
report_add ("Move %s to %s: %s", trp->file[file_id].name, trp->relative_dir,
rc == 0 ? "OK" : "FAILED");

Return to:

Send suggestions and report system problems to the System administrator.