standardize() shouldn't remove leading ./

This commit is contained in:
David Rose 2009-10-07 17:24:51 +00:00
parent ff91b31732
commit 062593344a

View File

@ -917,7 +917,7 @@ standardize() {
while (p < _filename.length()) {
size_t slash = _filename.find('/', p);
string component = _filename.substr(p, slash - p);
if (component == ".") {
if (component == "." && p != 0) {
// Ignore /./.
} else if (component == ".." && !components.empty() &&
!(components.back() == "..")) {