@branches = apply_throttle(@branches);
-my $global_lock_dir =
- $EximBuild::conf{global_lock_dir}
- ||$EximBuild::conf{build_root}
- ||'';
+my $global_lock_dir = $EximBuild::conf{global_lock_dir}
+ // $EximBuild::conf{build_root}
+ // die "$0: need global_lock_dir\n";
-unless ($global_lock_dir && -d $global_lock_dir)
-{
- die "no global lock directory: $global_lock_dir";
-}
+die "$0: need r/w permissions for directory '$global_lock_dir'\n"
+ if not -d -w $global_lock_dir;
# acquire the lock