X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Funlink.cpp;h=76445f6c6bf289ca761d8258c4c8c5cec8ab8548;hb=dad4c41302de525a1456e9d5b738831487c8acac;hp=458f5a904f7c5207837c23c33a59e57a868db435;hpb=66d1078c04849ec17a7343d0494d6ed087e04318;p=builder.git diff --git a/source/unlink.cpp b/source/unlink.cpp index 458f5a9..76445f6 100644 --- a/source/unlink.cpp +++ b/source/unlink.cpp @@ -1,10 +1,4 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include #include "filetarget.h" #include "sourcepackage.h" @@ -13,11 +7,16 @@ Distributed under the LGPL Unlink::Unlink(Builder &b, const FileTarget &t): Action(b) { - const SourcePackage &spkg=*static_cast(t.get_package()); + const SourcePackage &spkg = *static_cast(t.get_package()); announce(spkg.get_name(), "RM", relative(t.get_path(), spkg.get_source()).str()); - unlink(t.get_path()); + try + { + unlink(t.get_path()); + } + catch(const Msp::system_error &) + { } } int Unlink::check()