aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-28 12:09:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-28 12:09:42 +0200
commit936512ff890ef322d9406d024dc9d1a42b039f2b (patch)
tree2b1643dd3e450ae6405ba114dd20157402c7ab98
parent0ea4d93ee1d5e984722532da37966ebca7a0482b (diff)
Improve versioned library cleanup
-rw-r--r--build2/cc/link.cxx6
1 files 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)