diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2014-07-01 06:37:21 -0600 |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2014-07-01 06:38:35 -0600 |
commit | 9571214e55cb8b86dadb26b6b1d696ef488bdd4b (patch) | |
tree | 716a9d5a996a68e6fe6c1275f3b0d0b76babf9ec /Source/cmTimestamp.cxx | |
parent | 949715f027f738cb3558b69f5288f7655945ea80 (diff) | |
download | cmake-9571214e55cb8b86dadb26b6b1d696ef488bdd4b.tar.gz |
Encoding: Replace some system calls with kwsys calls which handle unicode.
Diffstat (limited to 'Source/cmTimestamp.cxx')
-rw-r--r-- | Source/cmTimestamp.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index ac26503c65..6fd6ab7b47 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -33,15 +33,13 @@ std::string cmTimestamp::CurrentTime( std::string cmTimestamp::FileModificationTime(const char* path, const std::string& formatString, bool utcFlag) { - struct stat info; - memset(&info, 0, sizeof(info)); - - if(stat(path, &info) != 0) + if(!cmsys::SystemTools::FileExists(path)) { return std::string(); } - return CreateTimestampFromTimeT(info.st_mtime, formatString, utcFlag); + time_t mtime = cmsys::SystemTools::ModifiedTime(path); + return CreateTimestampFromTimeT(mtime, formatString, utcFlag); } //---------------------------------------------------------------------------- |