From 1def3cc5205d2c78893d9b1eac8d2fdcab12a366 Mon Sep 17 00:00:00 2001 From: prpr Date: Tue, 6 Jun 2023 01:48:53 +0100 Subject: [PATCH] Overwrite files from previous shrink failure --- webif/lib/auto/plugin/shrink/queue.hook | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webif/lib/auto/plugin/shrink/queue.hook b/webif/lib/auto/plugin/shrink/queue.hook index b99d32b..32477f2 100644 --- a/webif/lib/auto/plugin/shrink/queue.hook +++ b/webif/lib/auto/plugin/shrink/queue.hook @@ -77,7 +77,7 @@ proc ::shrink::dequeue {q ts} { # Move the shrunken version back to the local directory. foreach f [glob "$tmp/shrunk.*"] { set ext [file extension $f] - file rename $f "${file}_shrunk${ext}" + file rename -force $f "${file}_shrunk${ext}" # Set the file time to match the old file file touch "${file}_shrunk${ext}" [$ts get file] } @@ -93,7 +93,7 @@ proc ::shrink::dequeue {q ts} { foreach ext $tsgroup { set f "${file}_shrunk.$ext" if {[file exists $f]} { - file rename $f "${file}.$ext" + file rename -force $f "${file}.$ext" } } $ts set_shrunk