From 936512ff890ef322d9406d024dc9d1a42b039f2b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Apr 2017 12:09:42 +0200 Subject: Improve versioned library cleanup --- build2/cc/link.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index e25ea04..80281f7 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -1566,6 +1566,7 @@ namespace build2 const path& p (paths.clean); if (!p.empty ()) + try { if (verb >= 3) text << "rm " << p; @@ -1588,14 +1589,15 @@ namespace build2 test (paths.soname) && test (paths.link)) { - try_rmfile (m, true); // Ignore errors. + try_rmfile (m); } } return true; }; - path_search (p, rm); + path_search (p, rm, dir_path (), false); // Don't follow symlinks. } + catch (const system_error&) {} // Ignore errors. } if (verb >= 2) -- cgit v1.1