Restrict Expire Walk
The BUGS section of the dirvish-expire manpage says: "Dirvish-expire will walk the file hierarchy of all banks or the specified vault looking for summary files. Anything non-dirvish in there may cause excess file-walking." And it's right. I just got bit hard because the lost+found on my disk happened to contain "#12371245/career/summary" and it was a directory.
Update: it's worse than I thought. The thing does a full find, so a directory named "summary" almost anywhere in the vault will lose! I did the obvious kludge for now:
--- dirvish-expire.pl 2007/01/27 22:13:57 1.1
+++ dirvish-expire.pl 2007/01/27 22:25:52
@@ -199,7 +199,7 @@
sub findop
{
- if ($_ eq 'tree')
+ if ($_ eq 'tree' || $_ eq 'lost+found')
{
$File::Find::prune = 1;
return 0;but this is obviously 'orrible. In particular, never name a vault 'tree', or it will never be expired.
A real fix, please? It doesn't look hard to do the right thing, i.e. only work with the vaults as defined in the config file, but I'm not a great Perl programmer and haven't worked inside this code before. Help appreciated.
BartMassey 2007 Jan 26
