Index: branches/eraser6/Manager/DirectExecutor.cs
===================================================================
--- branches/eraser6/Manager/DirectExecutor.cs	(revision 405)
+++ branches/eraser6/Manager/DirectExecutor.cs	(revision 406)
@@ -424,11 +424,11 @@
 				//Determine the total amount of data that needs to be written.
 				WriteStatistics statistics = new WriteStatistics();
-				Volume driveInfo = Volume.FromMountpoint(target.Drive);
-				long totalSize = method.CalculateEraseDataSize(null, driveInfo.TotalFreeSpace);
+				Volume volInfo = Volume.FromMountpoint(target.Drive);
+				long totalSize = method.CalculateEraseDataSize(null, volInfo.TotalFreeSpace);
 
 				//Continue creating files while there is free space.
 				eventArgs.currentItemName = "Unused space";
 				task.OnProgressChanged(eventArgs);
-				while (driveInfo.AvailableFreeSpace > 0)
+				while (volInfo.AvailableFreeSpace > 0)
 				{
 					//Generate a non-existant file name
@@ -446,5 +446,5 @@
 						//or the maximum size of one of these dumps.
 						stream.SetLength(Math.Min(ErasureMethod.FreeSpaceFileUnit,
-							driveInfo.AvailableFreeSpace));
+							volInfo.AvailableFreeSpace));
 
 						//Then run the erase task
@@ -622,19 +622,18 @@
 		private void EraseFilesystemRecords(DirectoryInfo info, ErasureMethod method)
 		{
-			DriveInfo driveInfo = new DriveInfo(info.Root.FullName);
-			string driveFormat = driveInfo.DriveFormat;
-			if (driveFormat == "NTFS")
+			Volume volInfo = Volume.FromMountpoint(info.FullName);
+			string volFormat = volInfo.VolumeFormat;
+			if (volFormat == "NTFS")
 			{
 				//If the volume is full, squeeze one-byte files.
 				try
 				{
-					FileInfo mftInfo = new FileInfo(driveInfo.RootDirectory.FullName +
-						Path.DirectorySeparatorChar + "$MFT");
+					StreamInfo mftInfo = new StreamInfo(Path.Combine(volInfo.VolumeID, "$MFT"));
 					long oldMFTSize = mftInfo.Length;
 					for ( ; ; )
 					{
 						//Open this stream
-						using (FileStream strm = new FileStream(info.FullName +
-							Path.DirectorySeparatorChar + GenerateRandomFileName(18),
+						using (FileStream strm = new FileStream(Path.Combine(
+							info.FullName, GenerateRandomFileName(18)),
 							FileMode.CreateNew, FileAccess.Write))
 						{
@@ -650,5 +649,5 @@
 						//Determine if we can stop. We will stop if the disk is not
 						//full and the MFT has grown in size.
-						if (driveInfo.TotalFreeSpace != 0 && mftInfo.Length != oldMFTSize)
+						if (volInfo.AvailableFreeSpace != 0 && mftInfo.Length != oldMFTSize)
 							break;
 					}
