From f8aa7d2a399ba7427e22c474191b1bd3331b647c Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 16 Mar 2024 11:49:21 +0100 Subject: retrieve file size during dir iteration instead of after opening file --- src/windows/main_windows.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/windows/main_windows.cpp') 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); -- cgit v1.2.3-70-g09d2