X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=scripts%2Fgit-cache-proxy;h=3e57a4f5530e2971794dd3a82612590421624c8e;hp=9720a699962f6fa00a050461d28cf269c38ee2a8;hb=c80b877026deff9a58854e9e06bdcef9f6427fcb;hpb=761b7bbea765ad42dc2f38278f3d41a042cf7c5d diff --git a/scripts/git-cache-proxy b/scripts/git-cache-proxy index 9720a69..3e57a4f 100755 --- a/scripts/git-cache-proxy +++ b/scripts/git-cache-proxy @@ -29,7 +29,7 @@ # git-cache-proxy # Copyright 2010 Tony Finch -# Copyright 2013 Ian Jackson +# Copyright 2013,2014 Ian Jackson # # git-cache-proxy is free software; you can redistribute it and/or # modify them under the terms of the GNU General Public License as @@ -415,14 +415,9 @@ sub housekeeping () { die "$dir: cannot rename to $tdir: $!\n"; } } - my $errs; - remove_tree($tdir, { safe=>1, error=>\$errs }); - if (!stat $tdir) { - foreach my $err (@$errs) { - my ($file, $message) = %$err; - logm 'info', "problem deleting: $file: $message"; - } - die "$dir: problem deleting file(s)\n"; + system qw(rm -rf --), $tdir; + if (stat $tdir) { + die "$dir: problem deleting file(s), rm exited $?\n"; } elsif ($! != ENOENT) { die "$tdir: cannot stat after deletion: $!\n"; }