]> git.tdb.fi Git - builder.git/commitdiff
Check for missing symlinks
authorMikko Rasa <tdb@tdb.fi>
Mon, 16 Jul 2012 19:25:26 +0000 (22:25 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 16 Jul 2012 23:30:03 +0000 (02:30 +0300)
source/installedfile.cpp

index f4b8a939832efc0aa150c5bc10196bba9c3f42c2..f2909f6127ec94d72f475ed200a9182276fd4742 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
 #include "builder.h"
 #include "installedfile.h"
@@ -54,4 +55,6 @@ void InstalledFile::check_rebuild()
                mark_rebuild(source.get_name()+" has changed");
        else if(source.needs_rebuild())
                mark_rebuild(source.get_name()+" needs rebuilding");
+       else if(!link.empty() && !FS::exists(link))
+               mark_rebuild("Symlink does not exist");
 }