From d921e444a72bdcd3eee6f80adca09732abdba5ce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 15 Sep 2012 10:15:57 +0530 Subject: [PATCH] Windows: Ignore drives A: and B: when scanning for the drives belonging to a device --- src/calibre/utils/windows/winutil.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/windows/winutil.c b/src/calibre/utils/windows/winutil.c index 64c943ffa5..5e45564032 100644 --- a/src/calibre/utils/windows/winutil.c +++ b/src/calibre/utils/windows/winutil.c @@ -276,8 +276,10 @@ get_all_removable_disks(struct tagDrives *g_drives) for(nLoopIndex = 0; nLoopIndex < MAX_DRIVES; nLoopIndex++) { - // if a drive is present, - if(dwDriveMask & 1) + // if a drive is present (we ignore the A and B drives as they are + // always present (even if no actual floppy is present) and we dont + // care about floppies) + if(nLoopIndex > 1 && dwDriveMask & 1) { caDrive[0] = 'A' + nLoopIndex;