From 6ba1fdc24587ed5ea42be09937cfe86bbc481b84 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Mon, 20 Jan 2020 09:58:42 +0300 Subject: [PATCH] clearer log messages --- src/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 8f4b8ac..6d28677 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -55,25 +55,25 @@ string getLastAlbumItem() { for (auto &entry : fs::directory_iterator(albumPath)) if (entry.is_directory() && isDigitsOnly(entry.path().filename()) && entry.path().filename().string().length() == 4) years.push_back(entry.path()); - if (years.empty()) return "no years"; + if (years.empty()) return ""; sort(years.begin(), years.end()); for (auto &entry : fs::directory_iterator(years.back())) if (entry.is_directory() && isDigitsOnly(entry.path().filename()) && entry.path().filename().string().length() == 2) months.push_back(entry.path()); - if (months.empty()) return "no months"; + if (months.empty()) return ""; sort(months.begin(), months.end()); for (auto &entry : fs::directory_iterator(months.back())) if (entry.is_directory() && isDigitsOnly(entry.path().filename()) && entry.path().filename().string().length() == 2) days.push_back(entry.path()); - if (days.empty()) return "no days"; + if (days.empty()) return ""; sort(days.begin(), days.end()); for (auto &entry : fs::directory_iterator(days.back())) if (entry.is_regular_file()) files.push_back(entry.path()); - if (files.empty()) return "no files"; + if (files.empty()) return ""; sort(files.begin(), files.end()); return files.back();