From dc1b424b75f200a716c3bd9b91891cf7f818ad32 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 9 Sep 2016 18:29:37 +0300 Subject: Fix crashing on unhandled system_error thrown by file_exists() --- build2/dist/operation.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build2/dist') diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx index 4628350..b5ca906 100644 --- a/build2/dist/operation.cxx +++ b/build2/dist/operation.cxx @@ -84,7 +84,7 @@ namespace build2 const dir_path& dist_root (cast (l)); - if (!dir_exists (dist_root)) + if (!exists (dist_root)) fail << "root distribution directory " << dist_root << " does not exist"; @@ -146,7 +146,7 @@ namespace build2 auto add_adhoc = [&trace] (scope& rs, const path& f) { path p (rs.src_path () / f); - if (file_exists (p)) + if (exists (p)) { dir_path d (p.directory ()); @@ -282,7 +282,7 @@ namespace build2 ? t.dir.leaf (src_root) : t.dir.leaf (out_root); - if (!dir_exists (d)) + if (!exists (d)) install (dist_cmd, d); install (dist_cmd, t, d); @@ -413,7 +413,7 @@ namespace build2 // Delete old archive for good measure. // path ap (dir / path (a)); - if (file_exists (ap, false)) + if (exists (ap, false)) rmfile (ap); // Use zip for .zip archives. Everything else goes to tar in the -- cgit v1.1