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 committed Nov 27, 2013
1 parent 1cd8fbd commit db76fa3
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 @@ -861,7 +861,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 @@ -129,8 +129,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 @@ -142,7 +142,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 @@ -264,7 +264,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 db76fa3

Please sign in to comment.