diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-06-11 14:57:31 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-06-11 14:57:31 +0300 |
commit | 86bfbfc7f264e07515b75611142243fde45da465 (patch) | |
tree | a35c2a3aca51e220228df3d8e3f3634adc8cf4b1 | |
parent | 3c7230c191ade30d5b9c8ef02a019ba42ab519f5 (diff) | |
download | revela-86bfbfc7f264e07515b75611142243fde45da465.tar.gz revela-86bfbfc7f264e07515b75611142243fde45da465.zip |
Remove false error messages from dry-run mode
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | src/fs.c | 4 | ||||
-rw-r--r-- | src/site.c | 2 |
3 files changed, 7 insertions, 4 deletions
@@ -27,5 +27,6 @@ system, or read the contents in `docs/` in the source. ## TODO: * Add exif tags to template hashmap. -* Better test coverage? (if I am not too lazy) -* Document. +* Re-render album html when an album.ini has changed. +* Better test coverage? (if I am not too lazy). +* Document templates. @@ -206,7 +206,9 @@ rmextra(const char *path, struct hmap *preserved, preremove_fn cb, { ssize_t removed = 0; DIR *dir = opendir(path); - if (dir == NULL) return -1; + if (dir == NULL) { + return dry ? 0 : -1; + } struct dirent *ent; while ((ent = readdir(dir))) { @@ -202,7 +202,7 @@ images_walk(struct bstnode *node, void *data) } success: - setdatetime(image->dst, &ddate); + if (!site->dry_run) setdatetime(image->dst, &ddate); return true; magick_fail: return false; |