--- stow.in.orig Fri Jun 14 08:32:15 2002 +++ stow.in Fri Jun 14 08:35:22 2002 @@ -252,6 +252,7 @@ $pure = 0; } } elsif (-d &JoinPaths($Target, $targetdir, $content)) { + next if !&FindStowPath(&JoinPaths($targetdir, $content)); ($subpure, $subother) = &Unstow(&JoinPaths($targetdir, $content), &JoinPaths('..', $stow)); if ($subpure) { @@ -509,7 +510,16 @@ local($path) = join('/', @_); local(@elts) = split(/\/+/, $path); pop(@elts); - join('/', @elts); + ($path = join('/', @elts)) ? $path : "/"; +} + +sub FindStowPath { + local($path) = @_; + local($collection); + foreach $collection (@Collections) { + return 1 if (-d &JoinPaths($Stow, $collection, $path)); + } + return 0; } sub usage {