diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 05da2b5ce7ee..85e9974efe6d 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -864,7 +864,7 @@ bool file_exists(const std::string& name) #endif } -time_t file_create_time(const std::string& fname) +time_t file_modified_time(const std::string& fname) { struct stat buf; if(::stat(fname.c_str(),&buf) == -1) diff --git a/src/filesystem.hpp b/src/filesystem.hpp index 5e454688a79c..72ef781ae916 100644 --- a/src/filesystem.hpp +++ b/src/filesystem.hpp @@ -130,8 +130,8 @@ bool is_directory(const std::string& fname); /** Returns true if a file or directory with such name already exists. */ bool file_exists(const std::string& name); -/** Get the creation time of a file. */ -time_t file_create_time(const std::string& fname); +/** Get the modification time of a file. */ +time_t file_modified_time(const std::string& fname); /** Returns true if the file ends with '.gz'. */ bool is_gzip_file(const std::string& filename); diff --git a/src/savegame.cpp b/src/savegame.cpp index b3f3496459b9..a8b1f5ec9e46 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -144,7 +144,7 @@ class save_index_class void rebuild(const std::string& name) { std::string filename = name; replace_space2underbar(filename); - time_t modified = filesystem::file_create_time(filesystem::get_saves_dir() + "/" + filename); + time_t modified = filesystem::file_modified_time(filesystem::get_saves_dir() + "/" + filename); rebuild(name, modified); } void rebuild(const std::string& name, const time_t& modified) { @@ -257,7 +257,7 @@ class create_save_info { save_info operator()(const std::string& filename) const { std::string name = filename; replace_underbar2space(name); - time_t modified = filesystem::file_create_time(dir + "/" + filename); + time_t modified = filesystem::file_modified_time(dir + "/" + filename); save_index_manager.set_modified(name, modified); return save_info(name, modified); }