Browse Source

standardize() shouldn't remove leading ./

David Rose 16 years ago
parent
commit
062593344a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/dtoolutil/filename.cxx

+ 1 - 1
dtool/src/dtoolutil/filename.cxx

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