Use relative path when tokenizing segments

Previously the raw path was used which may not have
had a resolved home directory included in it.
This commit is contained in:
Kevin Sawicki
2012-06-13 14:08:30 -07:00
parent 6f368f1be4
commit 151d2cf8c5

View File

@@ -72,8 +72,8 @@ void NativeHandler::Absolute(const CefString& name,
}
vector < string > segments;
char allSegments[path.length() + 1];
strcpy(allSegments, path.c_str());
char allSegments[relativePath.length() + 1];
strcpy(allSegments, relativePath.c_str());
const char* segment;
for (segment = strtok(allSegments, "/"); segment;
segment = strtok(NULL, "/")) {