From aab8ce5e3a3ba044e8257d2741b2d51e7cf570d1 Mon Sep 17 00:00:00 2001 From: Nikolay Minaylov Date: Thu, 11 Aug 2022 18:16:47 +0300 Subject: [PATCH] Skip empty lines in favorites.txt (#1571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- applications/archive/helpers/archive_favorites.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/archive/helpers/archive_favorites.c b/applications/archive/helpers/archive_favorites.c index fc0cad57..35199242 100644 --- a/applications/archive/helpers/archive_favorites.c +++ b/applications/archive/helpers/archive_favorites.c @@ -64,7 +64,7 @@ uint16_t archive_favorites_count(void* context) { break; } if(!string_size(buffer)) { - break; + continue; // Skip empty lines } ++lines; } @@ -93,7 +93,7 @@ static bool archive_favourites_rescan() { break; } if(!string_size(buffer)) { - break; + continue; } if(string_search(buffer, "/app:") == 0) { @@ -152,7 +152,7 @@ bool archive_favorites_read(void* context) { break; } if(!string_size(buffer)) { - break; + continue; } if(string_search(buffer, "/app:") == 0) { @@ -215,7 +215,7 @@ bool archive_favorites_delete(const char* format, ...) { break; } if(!string_size(buffer)) { - break; + continue; } if(string_search(buffer, filename)) { @@ -259,7 +259,7 @@ bool archive_is_favorite(const char* format, ...) { break; } if(!string_size(buffer)) { - break; + continue; } if(!string_search(buffer, filename)) { found = true; @@ -299,7 +299,7 @@ bool archive_favorites_rename(const char* src, const char* dst) { break; } if(!string_size(buffer)) { - break; + continue; } archive_file_append(