]> git.tdb.fi Git - builder.git/blobdiff - source/archive.cpp
Improve target names in announces
[builder.git] / source / archive.cpp
index 8b36391aece95ba911537fbd5f6dfba93dfaea2d..64a88afc63227d33a186de482859d8fd391b3115 100644 (file)
@@ -6,6 +6,7 @@ Distributed under the LGPL
 */
 
 #include <msp/fs/dir.h>
+#include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
 #include "archive.h"
 #include "builder.h"
@@ -36,9 +37,13 @@ Archive::Archive(Builder &b, const StaticLibrary &lib):
 
        FS::Path lpath=lib.get_path();
        if(!builder.get_dry_run())
+       {
                FS::mkpath(FS::dirname(lpath), 0755);
+               if(FS::exists(lib.get_path()))
+                       FS::unlink(lib.get_path());
+       }
 
-       announce(comp.get_package().get_name(), tool, relative(lpath, work_dir).str());
+       announce(comp.get_package().get_name(), tool, relative(lpath, work_dir).str().substr(2));
 
        launch();
 }