Skip to content

Commit

Permalink
Rename file_create_time to file_modified_time, as that's what it does
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and cbeck88 committed Oct 20, 2014
1 parent 7cc8760 commit 3cfcfec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/filesystem.cpp
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/filesystem.hpp
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/savegame.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 3cfcfec

Please sign in to comment.