X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dropbox_to_read;h=be05ca0877bc759c480bf8c476d47df9f2117a70;hb=e3b0b42558d6ff2d6d9ab799c3db75f48932bf89;hp=7ea896ad6886801a2866356f1d3a815ca9af5bcc;hpb=14f8ccc34cfd4fc6c01a594b5cb28c88964a24b3;p=bin.git diff --git a/dropbox_to_read b/dropbox_to_read index 7ea896a..be05ca0 100755 --- a/dropbox_to_read +++ b/dropbox_to_read @@ -38,6 +38,10 @@ if [ "$(basename "$0")" == "dropbox_read" ]; then echo "${PDF_FILE}.annot"; (cd "$TMPDIR"; diff -Nura a b ) | qprint --encode --binary > "${PDF_FILE}.annot" + # delete the annot file if it has size 0 + if ! [ -s "${PDF_FILE}.annot" ]; then + rm -f "${PDF_FILE}.annot" + fi; rm -f "$TMPDIR/a/file.pdf" rm -f "$TMPDIR/b/file.pdf" rmdir "$TMPDIR/a" "$TMPDIR/b" "$TMPDIR"