After trying just the second half there is the same problem at the same 
place,. I think we can safely say that means it has to do with the 
proprietary file system and the extra overhead it adds on. I also feel 
like that is a problem that needs to be fixed in the file system, not 
perl, so as I write this I am also preparing an SPR. i guess the edge test 
was proving a failure in the filesystem, rather than the interaction or 
the new product like was expected!

started with Z:\dssmoke (11 characters and 1 level deep) and added 8 
levels (12 characters per level) for a total of 9 levels (107 characters) 
and it didnt clean up either. (again some issue about non-empty directory)
i dont get why i've been able to go slight more in depth with +6 
characters in the "\directory_name" of the script i have, but i dont get 
much more in characters. i think that might have something to do with it.

i played this morning with some variations and still get the cleanup issue 
and slight variants on depth, so depth is related to directory name 
length.
just not sure how to go about proving that and making an edge test to show 
that right now.

since this proves it's the proprietary file system and not windows that is 
the problem i will need to SPR it. thanks for helping me prove that

-Josh



"$Bill Luebkert" <[EMAIL PROTECTED]> 
11/11/2005 01:35 PM

To
[EMAIL PROTECTED]
cc
[email protected]
Subject
Re: Directory Depth Cleanup






Try running this and see what you get - you can turn off either section
by setting the if (1) { to if (0) { - mine failed at 248 and 238 :

use strict;
use warnings;

use File::Path;

my $base_dir = 'C:/fubar';                               # base dir for 
test
my $start_dir = 'C:/fubar/a1234567890';          # start here
mkpath $start_dir or die "mkpath $start_dir: $! ($^E)" if not -d 
$start_dir;

my $len;
my $dir = $start_dir;

if (1) {                 # compute longest path by trying longer dir names

while (1) {
                 $dir .= '1234567890';
                 $len = length $dir;
                 if (not mkdir $dir) {
                                 warn "$dir ($len): $! ($^E)" if $debug;
                                 $dir =~ s/1234567890$//;
                                 rmdir $dir or warn "rmdir $dir: $! 
($^E)";
                                 last;
                 }
                 Win32::Sleep 250;               # safety sleep
}

while (1) {
                 $len = length $dir;
                 if (not mkdir $dir) {
                                 warn "$dir ($len): $! ($^E)" if $debug;
                                 last;
                 }
                 $dir .= '1';
                 Win32::Sleep 250;
}
print "Failed on $len character path using mkdir '$dir'\n";

# Failed on 248 character path using mkdir 
'C:/fubar/a1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789011111111'

sleep 30;                # take time to check tree here

rmtree ($base_dir, 0, 0) or die "rmtree $base_dir: $! ($^E)";

}

if (1) {                 # compute longest path by adding subdir names

$start_dir = 'C:/fubar/abcdefghijk';
mkpath $start_dir or die "mkpath $start_dir: $! ($^E)" if not -d 
$start_dir;
$dir = $start_dir;
while (1) {
                 $dir .= '/abcdefghijk';
                 $len = length $dir;
                 if (not mkdir $dir) {
                                 warn "$dir ($len): $! ($^E)" if $debug;
                                 $dir =~ s/\/abcdefghijk$//;
                                 rmdir $dir or warn "rmdir $dir: $! 
($^E)";
                                 $dir .= '/a';
                                 last;
                 }
                 Win32::Sleep 250;
}

while (1) {
                 $len = length $dir;
                 if (not mkdir $dir) {
                                 warn "$dir ($len): $! ($^E)" if $debug;
                                 last;
                 }
                 $dir .= '/a';
                 Win32::Sleep 250;
}
print "Failed on $len character path using mkdir '$dir'\n";

# Failed on 238 character path using mkdir 
'C:/fubar/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/abcdefghijk/a'

sleep 30;                # take time to check tree here
rmtree ($base_dir, 0, 0) or die "rmtree $base_dir: $! ($^E)";

}

__END__



-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic 
http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to