]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Check if file exists before deciding if fake disk should be inserted.
authorToni Wilen <twilen@winuae.net>
Sat, 23 Feb 2019 14:55:54 +0000 (16:55 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 23 Feb 2019 14:55:54 +0000 (16:55 +0200)
disk.cpp

index b6f38aec618bca78d2731a972f9dd7bb0656201b..aa5081e29d7d13f3128708f020f0528e9cef8ace 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -4574,7 +4574,7 @@ uae_u8 *restore_disk (int num,uae_u8 *src)
                } else if (newis) {
                        drive_insert (floppy + num, &currprefs, num, changed_prefs.floppyslots[num].df, false, false);
                        if (drive_empty (floppy + num)) {
-                               if (newis && old[0]) {
+                               if (newis && zfile_exists(old)) {
                                        _tcscpy (changed_prefs.floppyslots[num].df, old);
                                        drive_insert (floppy + num, &currprefs, num, changed_prefs.floppyslots[num].df, false, false);
                                        if (drive_empty (floppy + num))