]> git.tdb.fi Git - builder.git/blobdiff - source/dependencycache.cpp
Load builderrc from sys_data_dir to avoid the need of copying it to $HOME
[builder.git] / source / dependencycache.cpp
index 85ed4fd656b20a74746e0513d7dd11e13c2ad365..978a0e37b8ccb3bb96d7a56d43f0b9248fb3dbd2 100644 (file)
@@ -6,7 +6,7 @@ Distributed under the LGPL
 */
 
 #include <fstream>
-#include <msp/path/utils.h>
+#include <msp/fs/stat.h>
 #include <msp/strings/utils.h>
 #include "builder.h"
 #include "dependencycache.h"
@@ -24,10 +24,8 @@ const StringList &DependencyCache::get_deps(const string &tgt) const
 {
        DepsMap::const_iterator i=deps.find(tgt);
        if(i==deps.end())
-       {
-               static StringList dummy;
-               return dummy;
-       }
+               throw KeyError("Unknown dependencies", tgt);
+
        return i->second;
 }
 
@@ -73,5 +71,5 @@ void DependencyCache::load()
                deps[parts[0]]=StringList(parts.begin()+1, parts.end());
        }
 
-       mtime=Time::TimeStamp::from_unixtime(stat(fn).st_mtime);
+       mtime=Time::TimeStamp::from_unixtime(FS::stat(fn).st_mtime);
 }