Browse Source

correct handling of same-dir files

Patrick Brosi 5 years ago
parent
commit
b2d0c99b9c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ConfigFileParser.cpp

+ 1 - 0
ConfigFileParser.cpp

@@ -360,5 +360,6 @@ std::string ConfigFileParser::relPath(const std::string& file,
360
   // pass absolute paths through unchanged
360
   // pass absolute paths through unchanged
361
   if (file.size() && file[0] == '/') return file;
361
   if (file.size() && file[0] == '/') return file;
362
   curF.erase(std::find(curF.rbegin(), curF.rend(), '/').base(), curF.end());
362
   curF.erase(std::find(curF.rbegin(), curF.rend(), '/').base(), curF.end());
363
+  if (!curF.size()) return file;
363
   return curF + "/" + file;
364
   return curF + "/" + file;
364
 }
365
 }