diff options
Diffstat (limited to 'Master/tlpkg/libexec/place')
-rwxr-xr-x | Master/tlpkg/libexec/place | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place index 6b58a52ccee..48ec1fd3fab 100755 --- a/Master/tlpkg/libexec/place +++ b/Master/tlpkg/libexec/place @@ -223,11 +223,10 @@ if (! $chicken) { # dirs. This will catch some of those; not worth trying to do full # recursive search to get everything, cron.tl will report on leftovers. chomp (my $empty_dir_parent = `cd $empty_dir/.. && pwd`); - if ($opt_mode eq "svn") { - &xsystem ("cd $M && svn remove $empty_dir $empty_dir_parent # emptydir"); - } else { - &xsystem ("cd $M && rmdir $empty_dir $empty_dir_parent") - } + my ($parent_if_empty) = &empty_dirs ($empty_dir_parent); + my $cmd = $opt_mode eq "svn" ? "svn remove" : "rmdir"; + &xsystem ("cd $M && $cmd $empty_dir $parent_if_empty # emptydir"); + # # already in %dirs, so don't need to add. } } @@ -490,7 +489,7 @@ sub empty_dirs { if ($opt_mode eq "svn") { die "opendir($d) failed: $!"; } - # in git mode we don't die, git removes the empty dirs anywayi + # in git mode we don't die, git removes the empty dirs anyway } } return @ret; |