]> git.tdb.fi Git - builder.git/blobdiff - source/installedfile.cpp
Check for missing symlinks
[builder.git] / 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");
 }