Skip to content

cmirror next #15

Merged
merged 5 commits into from
Aug 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Honor --noop for type change of target directory
If we are running under --noop and a target directory would be replaced
by another file type, we currently delete the target directory, although
the actual replacement is not installed because of --noop.

Do not remove to-be-replaced directory when --noop is selected.
donald committed Aug 23, 2022
commit 06cf18d9c7812bb21e88e42c089bb5ab2842d5bb
2 changes: 1 addition & 1 deletion cmirror.c
Original file line number Diff line number Diff line change
@@ -515,7 +515,7 @@ static void add_clean_dir(char *dir) {
}

static void out_of_the_way(FileInfo *fi) {
if (fi->type == 'D') {
if (fi->type == 'D' && !fileop_noop) {
char *deleteme = g_strdup_printf("%s.deleteme", fi->name);
fileop_mv(fi->name, deleteme);
CLEAN_DIRS = g_slist_prepend(CLEAN_DIRS, deleteme);