aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/archive.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/bpkg/archive.cxx b/bpkg/archive.cxx
index ee3feab..96ba950 100644
--- a/bpkg/archive.cxx
+++ b/bpkg/archive.cxx
@@ -21,11 +21,8 @@ namespace bpkg
// level extension is .tar, strip that as well (e.g., .tar.bz2).
//
path d (a.leaf ().base ());
- if (const char* e = d.extension ())
- {
- if (e == string ("tar"))
- d = d.base ();
- }
+ if (d.extension () == "tar")
+ d = d.base ();
return path_cast<dir_path> (d);
}