From 281252b31686293359bc27a55ea7aba1bc103835 Mon Sep 17 00:00:00 2001 From: indigodarkwolf Date: Sat, 4 May 2024 04:53:19 -0500 Subject: [PATCH] Take 2 on fixing weird filesystem crashes. --- src/ieee.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ieee.cpp b/src/ieee.cpp index 3866550..ff07835 100644 --- a/src/ieee.cpp +++ b/src/ieee.cpp @@ -415,7 +415,7 @@ static int continue_directory_listing(uint8_t *data) } } - int file_size = (std::filesystem::is_directory(st) || std::filesystem::is_symlink(st)) ? 0 : static_cast((std::filesystem::file_size(dp.path()) + 255) / 256); + int file_size = (!std::filesystem::is_regular_file(st)) ? 0 : static_cast((std::filesystem::file_size(dp.path()) + 255) / 256); if (file_size > 0xFFFF) { file_size = 0xFFFF; }