]> git.tdb.fi Git - builder.git/commitdiff
Use stat to determine file existence
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Jun 2012 19:47:21 +0000 (22:47 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:52 +0000 (00:08 +0300)
source/dependencycache.cpp

index 8582e583a7ad1d3bcf01c7750a9f7138c881153e..6e099ba51dd2ce9f89f9cfaf4e608f010e2fce6c 100644 (file)
@@ -46,7 +46,7 @@ void DependencyCache::load()
 {
        string fn = (package.get_source()/".deps").str();
 
-       try
+       if(FS::Stat st = FS::stat(fn))
        {
                IO::BufferedFile in(fn);
 
@@ -57,8 +57,6 @@ void DependencyCache::load()
                        deps[parts[0]] = StringList(parts.begin()+1, parts.end());
                }
 
-               mtime = FS::stat(fn).get_modify_time();
+               mtime = st.get_modify_time();
        }
-       catch(const IO::file_not_found &)
-       { }
 }