]> git.tdb.fi Git - libs/core.git/commitdiff
Make fix_case to work with relative paths
authorMikko Rasa <tdb@tdb.fi>
Sun, 26 Jul 2015 16:58:38 +0000 (19:58 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 26 Jul 2015 16:58:38 +0000 (19:58 +0300)
source/fs/utils.cpp

index ed1ca0ab27c3e3c14070b88822e50cc742ca067c..1d663b77183cc2c4abcbbc68c9e7a44a75109429 100644 (file)
@@ -43,7 +43,7 @@ Path fix_case(const Path &path)
        Path result;
        for(Path::Iterator i=path.begin(); i!=path.end(); ++i)
        {
-               if(!found || *i=="/")
+               if(!found || (result.empty() && (*i=="/" || *i==".")))
                        result /= *i;
                else
                {