summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-07-15 14:06:57 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-07-15 14:56:09 -0700
commit7e2153ccac98df619ecde41b29878606b10c82b2 (patch)
tree13322a50671be562153aaa91323a674b9dedb228
parentf2d20ee9a3c411c2591ad23161a2d290a96e56cb (diff)
downloaddotfiles-7e2153ccac98df619ecde41b29878606b10c82b2.tar.gz
expand-annex-mboxes: avoid creating the maildir at all if no mboxes
-rwxr-xr-xbin/expand-annex-mboxes2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/expand-annex-mboxes b/bin/expand-annex-mboxes
index e12a574f..7800f021 100755
--- a/bin/expand-annex-mboxes
+++ b/bin/expand-annex-mboxes
@@ -19,7 +19,7 @@ our $expanded = "$ENV{HOME}/.fmail/annex";
# flock ourselves to ensure that only one copy of this script is ever running
open our $us, "<", $0 or die $!;
-exit 0 unless flock $us, LOCK_EX|LOCK_NB;
+exit 0 unless glob "$mboxes/*.gz" and flock $us, LOCK_EX|LOCK_NB;
make_path($expanded);
open my $touch_fh, '>', "$expanded/.duplicity-ignore";