diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-02-15 17:19:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-02-17 13:05:38 +0300 |
commit | 23c742932330d724e7b97c353e7cbc99f2b0c106 (patch) | |
tree | dbfb140aee6e2bbec1fd5d1bb4d3ef421f710bfd | |
parent | 630874b7ef55277c763671be76a5b238d6699553 (diff) |
Optimize normalize() overloads
-rw-r--r-- | bpkg/utility.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx index cb19ae7..625348b 100644 --- a/bpkg/utility.cxx +++ b/bpkg/utility.cxx @@ -99,7 +99,8 @@ namespace bpkg { try { - f.complete ().normalize (); + if (!f.complete ().normalized ()) + f.normalize (); } catch (const invalid_path& e) { @@ -118,7 +119,8 @@ namespace bpkg { try { - d.complete ().normalize (); + if (!d.complete ().normalized ()) + d.normalize (); } catch (const invalid_path& e) { |