replace startWith for Linux
This commit is contained in:
parent
8bc030fe94
commit
65bbde5c0e
@ -36,7 +36,7 @@ void ReloadDirectory(ftxui::ScreenInteractive& screen, const std::filesystem::pa
|
||||
if (std::filesystem::is_directory(entry.path()) || std::filesystem::is_regular_file(entry.path())) {
|
||||
|
||||
std::string name = entry.path().filename().string();
|
||||
if (name.starts_with("."))
|
||||
if (!name.empty() && name[0] == '.') // Works in C++11, C++14, and C++17
|
||||
continue; // Skip hidden files and directories
|
||||
entries.push_back(std::to_string(i) + ". " + name);
|
||||
clean_names.push_back(name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user