X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fconfig.cpp;h=2e3741e2a2a5120ab1d8e3bddfe573e2fc3ce21a;hb=69ad3610053e140cb5108f53e4c46a0583e33559;hp=74c3741466ae33131aa58d76551467c174f25dd6;hpb=bb5c048950a011f181cb3235ed2b0b2677869171;p=builder.git diff --git a/source/config.cpp b/source/config.cpp index 74c3741..2e3741e 100644 --- a/source/config.cpp +++ b/source/config.cpp @@ -6,17 +6,17 @@ Distributed under the LGPL */ #include -#include +#include #include #include #include "builder.h" #include "config.h" -#include "package.h" +#include "sourcepackage.h" using namespace std; using namespace Msp; -Config::Config(Package &p): +Config::Config(SourcePackage &p): package(p), freeze_mtime(false) { } @@ -171,7 +171,7 @@ void Config::finish() void Config::save() const { - Path::Path fn=package.get_source()/".options.cache"; + Path fn=package.get_source()/".options.cache"; OptionMap::const_iterator i=options.find("profile"); if(i!=options.end()) @@ -201,7 +201,7 @@ bool Config::set_option(const string &opt, const string &val) void Config::load() { - Path::Path fn=package.get_source()/".options.cache"; + Path fn=package.get_source()/".options.cache"; OptionMap::iterator i=options.find("profile"); if(i!=options.end()) @@ -210,9 +210,7 @@ void Config::load() ifstream in(fn.str().c_str()); if(!in) return; - struct stat st; - Path::stat(fn, st); - mtime=Time::TimeStamp::from_unixtime(st.st_mtime); + mtime=Time::TimeStamp::from_unixtime(stat(fn).st_mtime); DataFile::Parser parser(in, fn.str()); Loader loader(*this);