aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-10-13 13:11:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-10-13 13:11:42 +0200
commit15077a1f309d615dcd905b0aec009cd079475327 (patch)
tree229af1f423a29487864088ef61f6603eecacb0f3 /bpkg/manifest
parent76bcf09fde0b981879ebb76dce0514e03ff88ad4 (diff)
Make remote repository location path relative
Diffstat (limited to 'bpkg/manifest')
-rw-r--r--bpkg/manifest14
1 files changed, 7 insertions, 7 deletions
diff --git a/bpkg/manifest b/bpkg/manifest
index 0c7c693..cc45bb4 100644
--- a/bpkg/manifest
+++ b/bpkg/manifest
@@ -392,18 +392,18 @@ namespace bpkg
bool
absolute () const
{
- return local () && path_.absolute ();
+ if (empty ())
+ throw std::logic_error ("empty location");
+
+ // Note that in remote locations path is always relative.
+ //
+ return path_.absolute ();
}
bool
relative () const
{
- if (empty ())
- throw std::logic_error ("empty location");
-
- // Note that in remote locations path is always absolute.
- //
- return path_.relative ();
+ return local () && path_.relative ();
}
const butl::dir_path&