diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-21 15:15:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-21 15:15:18 +0200 |
commit | a345a24df9e40e0ba2bf1b35a5a98420b4cc255d (patch) | |
tree | 074d6c58fc87d7630baf6919b14ebbac371c4ed5 /butl/path | |
parent | b5ea2b682f8e0c3b8cd0f6692f4991f15d35ddd7 (diff) |
Make process_path effective path always absolute
Diffstat (limited to 'butl/path')
-rw-r--r-- | butl/path | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 } |