From: Toni Wilen Date: Tue, 22 Sep 2020 16:43:07 +0000 (+0300) Subject: Remove unneeded CD label hack. Use case-insensitive duplicate volume check. X-Git-Tag: 4900~310 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f03f453a3e5422e8470f9b745f3bc51e4b2de565;p=francis%2Fwinuae.git Remove unneeded CD label hack. Use case-insensitive duplicate volume check. --- diff --git a/od-win32/win32_filesys.cpp b/od-win32/win32_filesys.cpp index 5a2d636b..0ab84f3b 100644 --- a/od-win32/win32_filesys.cpp +++ b/od-win32/win32_filesys.cpp @@ -30,7 +30,7 @@ static int valid_volumename (struct uaedev_mount_info *mountinfo, const TCHAR *v /* if result is still good, we've passed the illegal names check, and must check for duplicates now */ if(result && fullcheck) { for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) { - if (mountinfo->ui[i].open && mountinfo->ui[i].volname && _tcscmp (mountinfo->ui[i].volname, volumename) == 0) { + if (mountinfo->ui[i].open && mountinfo->ui[i].volname && _tcsicmp (mountinfo->ui[i].volname, volumename) == 0) { result = 0; break; } @@ -47,19 +47,10 @@ int target_get_volume_name (struct uaedev_mount_info *mtinf, struct uaedev_confi drivetype = GetDriveType (ci->rootdir); if (inserted) { - if (GetVolumeInformation (ci->rootdir, ci->volname, sizeof ci->volname / sizeof (TCHAR), NULL, NULL, NULL, NULL, 0) && - ci->volname[0] && - valid_volumename (mtinf, ci->volname, fullcheck)) { - // +++Bernd Roesch - if(!_tcscmp (ci->volname, _T("AmigaOS35"))) - _tcscpy (ci->volname, _T("AmigaOS3.5")); - if(!_tcscmp (ci->volname, _T("AmigaOS39"))) - _tcscpy (ci->volname, _T("AmigaOS3.9")); - if(!_tcscmp (ci->volname, _T("AmigaOS_XL"))) - _tcscpy (ci->volname, _T("AmigaOS XL")); - // ---Bernd Roesch - if (_tcslen (ci->volname) > 0) - result = 1; + if (GetVolumeInformation (ci->rootdir, ci->volname, sizeof ci->volname / sizeof (TCHAR), NULL, NULL, NULL, NULL, 0)) { + if (ci->volname[0] && valid_volumename(mtinf, ci->volname, fullcheck)) { + result = 1; + } } }