aboutsummaryrefslogtreecommitdiff
path: root/butl/path
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-21 15:15:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-21 15:15:18 +0200
commita345a24df9e40e0ba2bf1b35a5a98420b4cc255d (patch)
tree074d6c58fc87d7630baf6919b14ebbac371c4ed5 /butl/path
parentb5ea2b682f8e0c3b8cd0f6692f4991f15d35ddd7 (diff)
Make process_path effective path always absolute
Diffstat (limited to 'butl/path')
-rw-r--r--butl/path10
1 files changed, 8 insertions, 2 deletions
diff --git a/butl/path b/butl/path
index e6c9166..d60938f 100644
--- a/butl/path
+++ b/butl/path
@@ -108,10 +108,16 @@ namespace butl
static bool
absolute (const string_type& s)
{
+ return absolute (s.c_str (), s.size ());
+ }
+
+ static bool
+ absolute (const C* s, size_type n)
+ {
#ifdef _WIN32
- return s.size () > 1 && s[1] == ':';
+ return n > 1 && s[1] == ':';
#else
- return s.size () != 0 && is_separator (s[0]);
+ return n != 0 && is_separator (s[0]);
#endif
}