Преглед на файлове

docs: warn users if they have a very common bad file name issue

Eric Helgeson преди 1 година
родител
ревизия
bd481b1b33
променени са 3 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 1 1
      lib/SCSI2SD/src/firmware/inquiry.c
  2. 1 0
      src/BlueSCSI_config.h
  3. 5 5
      src/BlueSCSI_disk.cpp

+ 1 - 1
lib/SCSI2SD/src/firmware/inquiry.c

@@ -175,7 +175,7 @@ void s2s_scsiInquiry()
 			allocationLength = 254;
 		}
 
-		// "real" hard drives send back exactly allocationLenth bytes, padded
+		// "real" hard drives send back exactly allocationLength bytes, padded
 		// with zeroes. This only seems to happen for Inquiry responses, and not
 		// other commands that also supply an allocation length such as Mode Sense or
 		// Request Sense.

+ 1 - 0
src/BlueSCSI_config.h

@@ -12,6 +12,7 @@
 
 // Configuration and log file paths
 #define CONFIGFILE  "bluescsi.ini"
+#define CONFIGFILE_BAD  "bluescsi.ini.txt"
 #define LOGFILE     "log.txt"
 #define CRASHFILE   "err.txt"
 

+ 5 - 5
src/BlueSCSI_disk.cpp

@@ -1031,12 +1031,12 @@ void s2s_configInit(S2S_BoardCfg* config)
 {
     char tmp[64];
 
-    if (SD.exists(CONFIGFILE))
-    {
+    if (SD.exists(CONFIGFILE)) {
         log("Reading configuration from " CONFIGFILE);
-    }
-    else
-    {
+    } else {
+        if (SD.exists(CONFIGFILE_BAD)) {
+          log("ERROR: Please remove the .txt file extension from the config file: ", CONFIGFILE_BAD);
+        }
         log("Config file " CONFIGFILE " not found, using defaults");
     }