X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchive.cpp;h=55b1f4615efe053bf1cf6dc68f915163929aae9d;hb=5006279d7b92e578ecfa8a04186f675c6b9f1eea;hp=8b36391aece95ba911537fbd5f6dfba93dfaea2d;hpb=ac6240aac62cec1fa7d019747fc40281de28a3ed;p=builder.git diff --git a/source/archive.cpp b/source/archive.cpp index 8b36391..55b1f46 100644 --- a/source/archive.cpp +++ b/source/archive.cpp @@ -6,6 +6,7 @@ Distributed under the LGPL */ #include +#include #include #include "archive.h" #include "builder.h" @@ -36,7 +37,11 @@ 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());