diff --git a/Components/FileSystem/FileSystem.scvd b/Components/FileSystem/FileSystem.scvd index 79c069c9..d368ac6c 100644 --- a/Components/FileSystem/FileSystem.scvd +++ b/Components/FileSystem/FileSystem.scvd @@ -1,7 +1,7 @@ - + diff --git a/Components/FileSystem/Include/rl_fs.h b/Components/FileSystem/Include/rl_fs.h index df2ced53..eb83d7c5 100644 --- a/Components/FileSystem/Include/rl_fs.h +++ b/Components/FileSystem/Include/rl_fs.h @@ -14,7 +14,7 @@ #define MW_FS_VERSION_MAJOR 8 #define MW_FS_VERSION_MINOR 0 -#define MW_FS_VERSION_PATCH 5 +#define MW_FS_VERSION_PATCH 6 // ==== Enumeration, structures, defines ==== diff --git a/Components/FileSystem/Source/fs_fat.c b/Components/FileSystem/Source/fs_fat.c index c3c53984..058a4927 100644 --- a/Components/FileSystem/Source/fs_fat.c +++ b/Components/FileSystem/Source/fs_fat.c @@ -812,7 +812,7 @@ static uint32_t char_validate (char ch) { (ch >= '^' && ch <= '{') || (ch == '}') || (ch == '~') ) { - + /* Valid SFN character */ val = 1; } #ifndef FS_FAT_NO_LFN @@ -821,9 +821,12 @@ static uint32_t char_validate (char ch) { (ch == ';') || (ch == '=') || (ch == '[') || - (ch == ']') || - (ch > 127) ) { - + (ch == ']') ) { + /* Valid LFN character */ + val = 2; + } + if ((uint8_t)ch > 127) { + /* Valid LFN character */ val = 2; } #endif @@ -1054,9 +1057,9 @@ static bool name_basis_gen (const char *fn, uint32_t fn_len, char *bn) { i = 0; /* Strip leading spaces */ - while (fn[i] == ' ' && i < fn_len) { i++; } + while ((i < fn_len) && (fn[i] == ' ')) { i++; } /* Strip leading periods */ - while (fn[i] == '.' && i < fn_len) { i++; } + while ((i < fn_len) && (fn[i] == '.')) { i++; } len = 0; lossy = false; @@ -1073,17 +1076,15 @@ static bool name_basis_gen (const char *fn, uint32_t fn_len, char *bn) { else { /* Skip all embedded spaces */ if (ch != ' ') { - if (len < 8) { - if (char_validate (ch) != 1) { - *bn = '_'; - lossy = true; - } - else { - *bn = ch; - } - bn++; - len++; + if (char_validate (ch) != 1) { + *bn = '_'; + lossy = true; } + else { + *bn = ch; + } + bn++; + len++; } } i++; diff --git a/Documentation/Doxygen/FileSystem/src/revision_history.md b/Documentation/Doxygen/FileSystem/src/revision_history.md index 21e628c9..6ce9334d 100644 --- a/Documentation/Doxygen/FileSystem/src/revision_history.md +++ b/Documentation/Doxygen/FileSystem/src/revision_history.md @@ -6,10 +6,11 @@ Description - V8.0.5 + V8.0.6 - corrected funmount for FAT drives when called multiple times - corrected FAT name cache entry size from 48 to 40 bytes + - corrected various minor code quality issues diff --git a/Documentation/Doxygen/General/src/revision_history.md b/Documentation/Doxygen/General/src/revision_history.md index d2ca937b..e866ba66 100644 --- a/Documentation/Doxygen/General/src/revision_history.md +++ b/Documentation/Doxygen/General/src/revision_history.md @@ -13,7 +13,7 @@ V8.3.1 - Network Component Version 8.3.1 - - FileSystem Component Version 8.0.5 + - FileSystem Component Version 8.0.6 - USB Component Version 8.0.2 (unchanged) diff --git a/Keil.MDK-Middleware.pdsc b/Keil.MDK-Middleware.pdsc index 8851b9c3..20178ba1 100644 --- a/Keil.MDK-Middleware.pdsc +++ b/Keil.MDK-Middleware.pdsc @@ -14,9 +14,10 @@ Active development ... - FileSystem Component Version 8.0.5 + FileSystem Component Version 8.0.6 - corrected funmount for FAT drives when called multiple times - corrected FAT name cache entry size from 48 to 40 bytes + - corrected various minor code quality issues Network Component Version 8.3.1 - fixed possible TCP socket reset after timeout recovery - various minor fixes and security improvements @@ -1163,7 +1164,7 @@ - + File Access on various storage devices Documentation/html/FileSystem/index.html