From 44effc4aa5d90944caac18111b7aa283d9211ac1 Mon Sep 17 00:00:00 2001 From: Morgan <2504532+mrgnw@users.noreply.github.com> Date: Mon, 20 Oct 2025 04:35:09 +0200 Subject: [PATCH] keep timestamps --- heics | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/heics b/heics index 7cf1c94..614d63f 100755 --- a/heics +++ b/heics @@ -12,6 +12,14 @@ find . -maxdepth 1 -type f \( \ $(printf -- "-iname %s -o " "${extensions[@]}") \ -false \) -print0 | \ parallel -0 -j "$(sysctl -n hw.ncpu)" ' - heic {} - mv {} original/{} - ' \ No newline at end of file + original_file={} + heic_file="${original_file%.*}.heic" + heic "$original_file" + + # Preserve the original file dates on the new HEIC file + if [[ -f "$heic_file" ]]; then + touch -r "$original_file" "$heic_file" + fi + + mv "$original_file" original/ + ' -- knotmirror 0.0.1