From 8bf164093296361c0936a9372fa199daabe4f6db Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Thu, 5 Dec 2013 13:39:05 +0600 Subject: fs/Traits.cxx: don't return drive path without trailing separator --- src/fs/Traits.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fs') diff --git a/src/fs/Traits.cxx b/src/fs/Traits.cxx index 934a9e2d0..3e874a224 100644 --- a/src/fs/Traits.cxx +++ b/src/fs/Traits.cxx @@ -71,6 +71,10 @@ GetParentPathImpl(typename Traits::const_pointer p) return typename Traits::string("."); if (sep == p) return typename Traits::string(p, p + 1); +#ifdef WIN32 + if (Traits::IsDrive(p) && sep == p + 2) + return typename Traits::string(p, p + 3); +#endif return typename Traits::string(p, sep); } -- cgit v1.2.3