diff options
-rw-r--r-- | build2/cc/link.cxx | 6 |
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) |