From a758c65668043ff9978031070741a543a71ef7a3 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Tue, 5 Sep 2023 08:19:55 -0500 Subject: [PATCH 1/2] Ignore hidden files. Fixes #64 --- src/BlueSCSI_disk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/BlueSCSI_disk.cpp b/src/BlueSCSI_disk.cpp index 33c4ee79..850a292a 100644 --- a/src/BlueSCSI_disk.cpp +++ b/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; } From 758b80436ce7d0b14a30eadf512e81cd087b84de Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Tue, 5 Sep 2023 08:25:32 -0500 Subject: [PATCH 2/2] Skip platform hook on raw drive. --- .../BlueSCSI_platform_config_hook.cpp | 4 ++-- src/ImageBackingStore.cpp | 5 +++++ src/ImageBackingStore.h | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/BlueSCSI_platform_RP2040/BlueSCSI_platform_config_hook.cpp b/lib/BlueSCSI_platform_RP2040/BlueSCSI_platform_config_hook.cpp index 38514fea..6145e628 100644 --- a/lib/BlueSCSI_platform_RP2040/BlueSCSI_platform_config_hook.cpp +++ b/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) diff --git a/src/ImageBackingStore.cpp b/src/ImageBackingStore.cpp index 8f36c5ff..02095b16 100644 --- a/src/ImageBackingStore.cpp +++ b/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) diff --git a/src/ImageBackingStore.h b/src/ImageBackingStore.h index d51a5402..6724c7cb 100644 --- a/src/ImageBackingStore.h +++ b/src/ImageBackingStore.h @@ -49,6 +49,9 @@ class ImageBackingStore // 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();