]> git.tdb.fi Git - builder.git/blobdiff - source/filetarget.cpp
Also use file size to determine whether to reinstall a file
[builder.git] / source / filetarget.cpp
index ed3e66b7c3711577a6a5e620086eec18e506f063..08b0f3115e984e25d30b73f6d2e21d5a5543236c 100644 (file)
@@ -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;
+       }
 }