aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs.c4
-rw-r--r--src/site.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/fs.c b/src/fs.c
index b6ec372..b2c94c8 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -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))) {
diff --git a/src/site.c b/src/site.c
index f26907e..eedd30b 100644
--- a/src/site.c
+++ b/src/site.c
@@ -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;