summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-16 11:49:21 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-16 11:49:21 +0100
commitf8aa7d2a399ba7427e22c474191b1bd3331b647c (patch)
tree464432a37e34f39c188aefef690466119288d86e /src/windows
parentfe4cf7b218974a05af58851878ba65d5f0e1f348 (diff)
retrieve file size during dir iteration instead of after opening file
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/main_windows.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/windows/main_windows.cpp b/src/windows/main_windows.cpp
index 4b086e8..b7f29f7 100644
--- a/src/windows/main_windows.cpp
+++ b/src/windows/main_windows.cpp
@@ -425,6 +425,7 @@ void ts_platform_list_files_block(ts_search_result* result, wchar_t* start_dir)
f->match_count = 0;
f->error = 0;
f->collapsed = false;
+ f->file_size = (file_info.nFileSizeHigh * (MAXDWORD+1)) + file_info.nFileSizeLow;
WideCharToMultiByte(CP_UTF8,0,complete_file_path,-1,(LPSTR)f->path,MAX_INPUT_LENGTH, NULL, NULL);
ts_mutex_lock(&result->files.mutex);