diff options
Diffstat (limited to 'include/Path.hpp')
-rw-r--r-- | include/Path.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/Path.hpp b/include/Path.hpp index 571fb9e..fe49265 100644 --- a/include/Path.hpp +++ b/include/Path.hpp @@ -41,7 +41,10 @@ namespace QuickMedia { size_t slash_index = data.rfind('/'); if(slash_index != std::string::npos && slash_index > 0) return Path(data.substr(0, slash_index)); - return Path("/"); + if(!data.empty() && data[0] == '/') + return Path("/"); + else + return Path(""); } std::string data; |