diff --git a/modules/pcx86/lib/fdc.js b/modules/pcx86/lib/fdc.js index 22ada1715..0817d533f 100644 --- a/modules/pcx86/lib/fdc.js +++ b/modules/pcx86/lib/fdc.js @@ -1400,8 +1400,16 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut { var drive = this.aDrives[iDrive]; if (sDiskettePath) { + /* + * TODO: This code contains two hacks that should eventually be eliminated: first, machines + * with saved states may attempt to load disks using old paths, so we replace the old path + * with the new, and second, they be using lower-case disk image names, whereas we now use + * UPPER-CASE names for disk images, so we lower-case both before comparing. The only problem + * with removing these hacks is that we can never be sure when all saved states in the wild + * have been updated.... + */ sDiskettePath = sDiskettePath.replace("/disks/pc/", "/disks/pcx86/"); - if (drive.sDiskettePath != sDiskettePath) { + if (drive.sDiskettePath.toLowerCase() != sDiskettePath.toLowerCase()) { this.unloadDrive(iDrive, fAutoMount, true); if (drive.fBusy) { this.notice("Drive " + iDrive + " busy");