AllDup supports only 25 drive letters

English support for the software AllDup
Post Reply
Synetech
Posts: 48
Joined: 19 Jan 2011, 09:32
Contact:

AllDup supports only 25 drive letters

Post by Synetech »

I finally figured out why AllDup never lists my Z: partition: because it only supports 25 drive letters. Last week, I removed the B: letter assigned to a partition and forgot to re-assign it. Today, I ran AllDup and noticed that Z: was listed in the drive list, but then I noticed that B: was not. I re-assigned B: to the other partition and restarted AllDup, and Z: was gone again.

You can still use all of the drive letters by manually adding it as a folder (e.g., Z:\), but this bug prevents more than 25 letters from appearing at the top of the folder list with the other drives.

The bug is probably due to an “off-by-one” error where the drive list has only 25 entries instead of 26 or is using a piece of code like if driveLetter<26 instead of if driveLetter<27 or if driveLetter<=26.
Administrator
Site Admin
Posts: 4047
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: AllDup supports only 25 drive letters

Post by Administrator »

Sorry for the late response.
There is no code line that limit the available drive letters to 25.
AllDup determine all available drive letters from windows and check the drive type for each drive letter.
If the drive type cannot be determined it will not be displayed at the list.
Synetech
Posts: 48
Joined: 19 Jan 2011, 09:32
Contact:

Re: AllDup supports only 25 drive letters

Post by Synetech »

It’s probably not an if; it’s probably an off-by-one error in a for loop. For example:

Code: Select all

drives=GetDriveList();
for (int i=1; i<drives.length(); i++) {
  SourceList.Add(drives[i-1]);
}
In this example, the for loop starts at 1 and compensates by subtracting 1 from the index, but also uses < in the condition instead of <=. I don’t know if that’s what’s happening in your code or some other variation, but it’s likely an off-by-one error in the code that puts the drives at the top of the folder list.

Here’s steps to reproduce the problem:
  • Mount 25 volumes (partitions, USB drives, virtual drives, etc.)
  • Run AllDup
  • See that the last drive-letter is shown in the drive list
  • Close AllDup
  • Add one more volume (for a total of 26 drive letters)
  • Run AllDup again
  • See that the last drive letter (Z:) is not shown
The screenshot below shows it in action. I had 25 drive letters used, and Z: was included. I then mounted a virtual drive as W: (nothing else was changed) and ran AllDup again, and this time, Z: was bumped out of the list. The Z: drive was still there and could be added as a regular source-folder and AllDup could scan it just fine, so it is was definitely a bug in the code that adds the drives to the folder list.

It’s not really critical because you can still add it as a regular source-folder, but it’s a bit inconvenient and confusing.

Image
Administrator
Site Admin
Posts: 4047
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: AllDup supports only 25 drive letters

Post by Administrator »

With next the update AllDup will add all available drive letters no matter if AllDup can determine the drive type or not.
Synetech
Posts: 48
Joined: 19 Jan 2011, 09:32
Contact:

Re: AllDup supports only 25 drive letters

Post by Synetech »

Administrator wrote:With next the update AllDup will add all available drive letters no matter if AllDup can determine the drive type or not.
Okay; I’ll test it then. (Though I don’t think the type is the problem because it happens regardless of the type. It happens with USB drives, CD/DVD drives, hard-drive partitions, virtual drives, etc. Also, as you can see in the screenshot, Z: (a DVD drive) showed up just fine when there were only 25 volumes, but it disappeared when I added W:, so it can’t be Z’s type that is the problem since it was shown just fine before.)
Administrator
Site Admin
Posts: 4047
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: AllDup supports only 25 drive letters

Post by Administrator »

I can send you an new update so you can test the new changes if you want...
Post Reply