1

Closed

Refactored Class Volume

description

-Refactored Class Volume;
-Build for .NET 3.5;
-15 Volume UnitTests;

file attachments

Closed May 1, 2012 at 8:58 AM by Yomodo
Although still a work in progress, tested and stable for now.No need to have this as an issue at the moment.

comments

wrote Feb 3, 2012 at 1:07 PM

Associated with changeset 85981.

Shane32 wrote Feb 7, 2012 at 12:08 AM

In this changeset 85981, it appears that the GetUniqueVolumeNameForPath will never throw an exception, and GetUniqueVolumeNameForVolumeMountPoint will always return a blank string. I didn't test it; just reading the code.

Yomodo wrote Feb 7, 2012 at 11:38 AM

Noted, will look into this. Thank you.

Yomodo wrote Feb 7, 2012 at 11:41 AM

Question: does the Unittest SetVolumeLabel() fails on your machine?

My own experience: when creating the unittest, all tested out ok.
Normalex, another developer of AlphaFS, encountered a failed Unittest on his machine.

After I reinstalled my machine (Windows 7 Enterprise, 32bits) the same Unittest now
also fails on my machine. :|

However, as I continued to install Office 2010 and the other massive amounts of Windows hotfixes/patches, the Unittest now succeeds! :|

So, I'd like to know your experience regarding this Unittest.

Yomodo wrote Feb 7, 2012 at 12:16 PM

Hm.. really tiresome, I installed another tool: Acronis True Home Image 2011, and guess what: after rebooting my machine: the Unittest fails again. :|

Shane32 wrote Feb 9, 2012 at 4:10 PM

No, it fails for me saying "Error Win32: 123, Error HRESULT: -2147467259
*Error Messsage: The filename, directory name, or volume label syntax is incorrect"

After adding a backslash to the path name, it works. That is, calling SetVolumeLabelW with C:\ instead of just C:

Shane32 wrote Feb 9, 2012 at 4:15 PM

Note that MSDN docs say the path (or mount point) must end with a backslash, so that's probably your problem. In fact, your remarks for your SetVolumeLabel function says "A trailing backslash is required and will be added", even though it does not add the backslash. Hope this helps! -Shane

Yomodo wrote Feb 10, 2012 at 8:09 AM

The method lacks this line: rootPathName = Path.BackslashAdd(rootPathName);

Ohw boy, my bad. :)

Yomodo wrote Feb 10, 2012 at 8:17 AM

The method lacks this line: rootPathName = Path.BackslashAdd(rootPathName);

Ohw boy, my bad. :)

wrote Feb 16, 2012 at 4:57 PM

Associated with changeset 86556.

wrote Feb 18, 2012 at 6:01 PM

Associated with changeset 86625.

wrote Feb 18, 2012 at 6:53 PM

Associated with changeset 86628.

wrote Feb 18, 2012 at 7:40 PM

Associated with changeset 86630.