[Dirvish] dirvish-expire loses on 'summary' directory

Barton C Massey bart at cs.pdx.edu
Sat Jan 27 23:39:19 UTC 2007


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---moving the contents of lost+found to a
different level is not sufficient. 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.

BTW, I put a copy of this at
  http://wiki.dirvish.org/index.cgi?RestrictExpireWalk
referenced from
  http://wiki.dirvish.org/index.cgi?RequestsForEnhancement
Is the latter page still being used, or do bug reports want
to go somewhere else?

Thanks much for any help you can give.

    Bart Massey
    bart at cs.pdx.edu



More information about the Dirvish mailing list