We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d934f56 commit 536e637Copy full SHA for 536e637
httplib.h
@@ -3158,11 +3158,11 @@ inline bool FileStat::is_dir() const {
3158
}
3159
3160
inline size_t FileStat::mtime() const {
3161
- return static_cast<size_t>(st_.st_mtime);
+ return ret_ >= 0 ? static_cast<size_t>(st_.st_mtime) : 0;
3162
3163
3164
inline size_t FileStat::size() const {
3165
- return static_cast<size_t>(st_.st_size);
+ return ret_ >= 0 ? static_cast<size_t>(st_.st_size) : 0;
3166
3167
3168
inline std::string encode_path(const std::string &s) {
0 commit comments