Skip to content

Commit

Permalink
Use "modification time" instead of "creation time"
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Buisson committed Oct 11, 2024
1 parent b1172dc commit 02734ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fineftp-server/src/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,17 @@ namespace Filesystem

#if defined(__unix__)
localtime_r(&now_time_t, &now_timeinfo);
localtime_r(&file_status_.st_ctime, &file_timeinfo);
localtime_r(&file_status_.st_mtime, &file_timeinfo);
#elif defined(_MSC_VER)
localtime_s(&now_timeinfo, &now_time_t);
localtime_s(&file_timeinfo, &file_status_.st_ctime);
localtime_s(&file_timeinfo, &file_status_.st_mtime);
#else
static std::mutex mtx;
{
std::lock_guard<std::mutex> lock(mtx);

now_timeinfo = *std::localtime(&now_time_t);
file_timeinfo = *std::localtime(&file_status_.st_ctime);
file_timeinfo = *std::localtime(&file_status_.st_mtime);
}
#endif

Expand Down

0 comments on commit 02734ce

Please sign in to comment.