From 3bf5405f29937128bc945177d73ced3442f7b51d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 7 Jun 2012 22:47:21 +0300 Subject: [PATCH] Use stat to determine file existence --- source/dependencycache.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/dependencycache.cpp b/source/dependencycache.cpp index 8582e58..6e099ba 100644 --- a/source/dependencycache.cpp +++ b/source/dependencycache.cpp @@ -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 &) - { } } -- 2.45.2