Mercurial > hg > th-libs
comparison th_file.c @ 742:64af66cae541
Always clear stat structure in th_stat_path().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 14 Dec 2022 01:38:08 +0200 |
parents | 0852bd106034 |
children | db1a132c7754 |
comparison
equal
deleted
inserted
replaced
741:0852bd106034 | 742:64af66cae541 |
---|---|
97 #endif | 97 #endif |
98 | 98 |
99 | 99 |
100 bool th_stat_path(const char *path, th_stat_data *data) | 100 bool th_stat_path(const char *path, th_stat_data *data) |
101 { | 101 { |
102 memset(data, 0, sizeof(*data)); | |
103 | |
102 #if defined(TH_PLAT_WINDOWS) | 104 #if defined(TH_PLAT_WINDOWS) |
103 WIN32_FILE_ATTRIBUTE_DATA fdata; | 105 WIN32_FILE_ATTRIBUTE_DATA fdata; |
104 if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fdata)) | 106 if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fdata)) |
105 return false; | 107 return false; |
106 | 108 |