From c3047fc3f7436dd1cba629c3d4d970df214ffa88 Mon Sep 17 00:00:00 2001
From: Don Armstrong <don@donarmstrong.com>
Date: Mon, 14 Nov 2016 15:25:13 -0800
Subject: [PATCH] remove empty annotation files

---
 evince_annot | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/evince_annot b/evince_annot
index 1a9c1e3..079cdc2 100755
--- a/evince_annot
+++ b/evince_annot
@@ -26,6 +26,9 @@ fi;
 
 (cd "$TMPDIR";
  diff -Nura a b ) | qprint -e > "${1}.annot"
+if ! [ -s "${1}.annot" ]; then
+    rm -f "${1}.annot";
+fi;
 rm -f "$TMPDIR/a/file.pdf"
 rm -f "$TMPDIR/b/file.pdf"
 rmdir "$TMPDIR/a" "$TMPDIR/b" "$TMPDIR"
-- 
2.39.5