Ver Fonte

Merge pull request #68 from BlueSCSI/eric/64

Fix #64 - Issue with implict CD changing when hidden files are in dir
Eric Helgeson há 2 anos atrás
pai
commit
d00ebe016b

+ 2 - 2
lib/BlueSCSI_platform_RP2040/BlueSCSI_platform_config_hook.cpp

@@ -83,9 +83,9 @@ void platformConfigHook(image_config_t *img)
         debuglog("Skipping platformConfigHook due to DisableConfigHook");
         return;
     }
-    if(img->file.isRom())
+    if(img->file.isRom() || img->file.isRaw())
     {
-        debuglog("Skipping platformConfigHook on ROM Drive.");
+        debuglog("Skipping platformConfigHook on ROM/Raw Drive.");
         return;
     }
     if (img->quirks == S2S_CFG_QUIRKS_APPLE)

+ 5 - 0
src/BlueSCSI_disk.cpp

@@ -480,6 +480,11 @@ bool scsiDiskFilenameValid(const char* name)
             }
         }
     }
+    if(name[0] == '.')
+    {
+        debuglog("-- Ignoring hidden file ", name);
+        return false;
+    }
     return true;
 }
 

+ 5 - 0
src/ImageBackingStore.cpp

@@ -131,6 +131,11 @@ bool ImageBackingStore::isRom()
     return m_isrom;
 }
 
+bool ImageBackingStore::isRaw()
+{
+    return m_israw;
+}
+
 bool ImageBackingStore::close()
 {
     if (m_israw)

+ 3 - 0
src/ImageBackingStore.h

@@ -49,6 +49,9 @@ public:
     // Is this internal ROM drive in microcontroller flash?
     bool isRom();
 
+    // Is the image using the raw SD card?
+    bool isRaw();
+
     // Close the image so that .isOpen() will return false.
     bool close();