diff options
Diffstat (limited to 'src/null.c')
-rw-r--r-- | src/null.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -17,13 +17,13 @@ #include "wydawca.h" int -null_move_file (struct file_triplet *trp, const struct spool *spool, - enum file_type file_id, const char *reldir) +null_move_file (struct file_triplet *trp, enum file_type file_id) { + const struct spool *spool = trp->spool; const char *file_name = trp->file[file_id].name; if (debug_level) logmsg (LOG_DEBUG, _("spool %s: installing file `%s/%s'"), - spool->tag, reldir, file_name); + spool->tag, trp->relative_dir, file_name); UPDATE_STATS (STAT_UPLOADS); if (!dry_run_mode && unlink (file_name)) { @@ -35,34 +35,32 @@ null_move_file (struct file_triplet *trp, const struct spool *spool, } int -null_archive_file (struct file_triplet *trp, const struct spool *spool, - const char *file_name, const char *reldir) +null_archive_file (struct file_triplet *trp, const char *file_name) { if (debug_level) - logmsg (LOG_DEBUG, _("spool %s: archiving `%s'"), spool->tag, file_name); + logmsg (LOG_DEBUG, _("spool %s: archiving `%s'"), + trp->spool->tag, file_name); UPDATE_STATS (STAT_ARCHIVES); return 0; } int -null_symlink_file (struct file_triplet *trp, const struct spool *spool, - const char *reldir, +null_symlink_file (struct file_triplet *trp, const char *wanted_src, const char *wanted_dst) { if (debug_level) logmsg (LOG_DEBUG, _("spool %s: symlinking `%s' to `%s'"), - spool->tag, wanted_src, wanted_dst); + trp->spool->tag, wanted_src, wanted_dst); UPDATE_STATS (STAT_SYMLINKS); return 0; } int -null_rmsymlink_file (struct file_triplet *trp, const struct spool *spool, - const char *reldir, const char *file_name) +null_rmsymlink_file (struct file_triplet *trp, const char *file_name) { if (debug_level) logmsg (LOG_DEBUG, _("spool %s: removing symlink `%s/%s'"), - spool->tag, reldir, file_name); + trp->spool->tag, trp->relative_dir, file_name); UPDATE_STATS (STAT_RMSYMLINKS); return 0; } |