aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-02-15 17:19:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-02-17 13:05:38 +0300
commit23c742932330d724e7b97c353e7cbc99f2b0c106 (patch)
treedbfb140aee6e2bbec1fd5d1bb4d3ef421f710bfd
parent630874b7ef55277c763671be76a5b238d6699553 (diff)
Optimize normalize() overloads
-rw-r--r--bpkg/utility.cxx6
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)
{