From Mattias Helsing, "Subject: osga reading slash mismatch
requests for files in a archive are made with unix style paths. So to be able to match an entry in map(_indexMap) it's keys needs to be stored in unix style even on Win32" Note from Robert Osfied, simplified this submission so that the added conversion to unix slahes is done on all platforms as this should be safe and simpler to maintain.
This commit is contained in:
@@ -234,8 +234,9 @@ bool OSGA_Archive::IndexBlock::getFileReferences(FileNamePositionMap& indexMap)
|
||||
|
||||
std::string filename(ptr, ptr+filename_size);
|
||||
|
||||
// record this entry into the FileNamePositionMap
|
||||
indexMap[filename] = PositionSizePair(position,size);
|
||||
// record this entry into the FileNamePositionMap.
|
||||
// Requests for files will be in unix style even on Win32 so need unix style keys in map.
|
||||
indexMap[osgDB::convertFileNameToUnixStyle(filename)] = PositionSizePair(position,size);
|
||||
|
||||
ptr += filename_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user