]> git.tdb.fi Git - libs/core.git/commitdiff
Add a missing ! to make .. components to behave correctly
authorMikko Rasa <tdb@tdb.fi>
Fri, 22 Sep 2006 11:05:50 +0000 (11:05 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 22 Sep 2006 11:05:50 +0000 (11:05 +0000)
source/path.cpp

index 6127f7a84c06955dc4963589a8406515d3bd4207..e79a8fe010210e18da9c57817d35754292d61e70 100644 (file)
@@ -155,7 +155,7 @@ void Path::add_component(const string &comp)
                {
                        unsigned slash=path.rfind(DIRCHAR);
                        unsigned start=(slash==string::npos)?0:slash+1;
-                       if(path.compare(start, string::npos, ".."))
+                       if(!path.compare(start, string::npos, ".."))
                        {
                                // If the last component already is a .., add another
                                path+=DIRCHAR;