findphysicaldrive.pl - Fixed so it works with empty (freshly formatted) drives.
authorSimonH <simonh@symbian.org>
Fri, 12 Mar 2010 14:16:11 +0000
changeset 924 a5ed0e6ca679
parent 923 5ccf9d5ab663
child 925 f1243b2c51fe
findphysicaldrive.pl - Fixed so it works with empty (freshly formatted) drives.
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];