X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffiletarget.cpp;h=08b0f3115e984e25d30b73f6d2e21d5a5543236c;hb=a40db37e1e681d397d4bfc6c893e15945c533b72;hp=ed3e66b7c3711577a6a5e620086eec18e506f063;hpb=e68e95f8a44150e69d2f4b74995a12013dfe75aa;p=builder.git diff --git a/source/filetarget.cpp b/source/filetarget.cpp index ed3e66b..08b0f31 100644 --- a/source/filetarget.cpp +++ b/source/filetarget.cpp @@ -15,9 +15,13 @@ using namespace Msp; FileTarget::FileTarget(Builder &b, const Package *p, const FS::Path &a): // XXX Builder depends on target name being its path for locating file targets Target(b, p, /*FS::basename*/(a.str())), - path(a) + path(a), + size(0) { struct stat st; if(!FS::stat(path, st)) + { mtime=Time::TimeStamp::from_unixtime(st.st_mtime); + size=st.st_size; + } }