# HG changeset patch # User SimonH # Date 1268403371 0 # Node ID a5ed0e6ca6798b15bbc100c20587b0e583ae543f # Parent 5ccf9d5ab66369915235b26120ba99a8bb8c9118 findphysicaldrive.pl - Fixed so it works with empty (freshly formatted) drives. diff -r 5ccf9d5ab663 -r a5ed0e6ca679 common/tools/findPhysicalDrive.pl --- a/common/tools/findPhysicalDrive.pl Thu Mar 11 13:23:18 2010 +0000 +++ b/common/tools/findPhysicalDrive.pl Fri Mar 12 14:16:11 2010 +0000 @@ -74,7 +74,7 @@ next if ($driveLine =~ m{System\s*$}); # Use dir to get the freespace (bytes) - my @bytesFree = grep { s{^.*?(\d+) bytes free\s*$}{$1} } map {chomp;$_} `cmd /c dir /-C $letter:\\`; + my @bytesFree = grep { s{^.*?(\d+) bytes free\s*$}{$1} } map {chomp;$_} `cmd /c dir /-C /A $letter:\\`; # Take the value from the bottom of the report my $bytesFree = $bytesFree[-1];