From b7f362f25ab0d961df1e100af7d07165b5ecdfc3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 11 Jul 2015 19:14:03 +0100 Subject: Mirroring: Remove pointless empty .log files --- infra/dgit-mirror-rsync | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'infra/dgit-mirror-rsync') diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index 47142ee..0d29ffb 100755 --- a/infra/dgit-mirror-rsync +++ b/infra/dgit-mirror-rsync @@ -108,7 +108,11 @@ attempt () { exec 3>&2 >"$queue/$package.err" 2>&1 if actually; then rm -f "$queue/$package.a" + exec 2>&3 2>&1 mv -f "$queue/$package.err" "$queue/$package.log" + if ! [ -s "$queue/$package.log" ]; then + rm "$queue/$package.log" + fi rm "$queue/$package.lock" else cat >&3 "$queue/$package.err" -- cgit v1.2.3