From da3fe98e5c75940135fcd9bb45b36eed62d8b4dc Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Tue, 01 Sep 2009 19:59:38 +0000 Subject: fixed normalization for the single-character trailing component Thanks Hiroyuki ARAKI for spotting the bug and providing the fix Signed-off-by: Michael Krelin --- diff --git a/lib/util.cc b/lib/util.cc index 249eeed..4028697 100644 --- a/lib/util.cc +++ b/lib/util.cc @@ -372,7 +372,7 @@ namespace opkele { rv += pseg; rv += c; pseg.clear(); }else if(n>=ul || strchr("?/#",c)) { - if(pseg.empty() || pseg==".") { + if( (unsafe!=string::npos && pseg.empty()) || pseg==".") { }else if(pseg=="..") { if(psegs.size()>1) { rv.resize(psegs.top()); psegs.pop(); -- cgit v0.9.0.2