in reply to fs branch point - common parent dir
but I may be missing something (besides the debug code...)sub find_common_parent_node { my( $dir1, $dir2 ) = @_; my @dir1 = ( $dir1->volume, $dir1->dir_list ); my @dir2 = ( $dir2->volume, $dir2->dir_list ); my @sharan; while ( @dir1 and @dir2 and $dir1[0] eq $dir2[0] ) { push @sharan, shift @dir1; shift @dir2; } # if needed: my $dir_A = dir( @dir1 ); my $dir_B = dir( @dir2 ); dir( @sharan ) }
|
---|