]> git.tdb.fi Git - builder.git/commitdiff
Don't try to unlink nonexistent files
authorMikko Rasa <tdb@tdb.fi>
Thu, 10 May 2012 21:15:35 +0000 (00:15 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:51 +0000 (00:08 +0300)
source/builder.cpp

index 69bd607bb3d8cdaa519df5dc460a3bf67e70ac2c..9fdb8ee6a56e6b9fb5dfa709cd8d6e90cfdd596e 100644 (file)
@@ -648,7 +648,8 @@ int Builder::do_clean()
 
        for(set<Target *>::iterator i=clean_tgts.begin(); i!=clean_tgts.end(); ++i)
                if(FileTarget *ft = dynamic_cast<FileTarget *>(*i))
-                       unlink(ft->get_path());
+                       if(ft->get_mtime())
+                               FS::unlink(ft->get_path());
 
        return 0;
 }