forked from mirrors/0ad
path improvements/fixes:
- replace more std::wstring with Native or VfsPath; wstring_from_utf8 -> NativePathFromString - replace sequences of Join(Path(), Basename+extension) with ChangeExtension in wsdl, CacheLoader - add Path::IsDirectory to replace .empty() / path_is_dir_sep(.back()). also changed behavior to reflect the fact that "" is the VFS root _directory_ - Path::Join now allows 2 identical path types (e.g. VfsPath) or one char* literal (prevents inadvertently introducing non-safe characters). to convert from wstring or wchar_t, use an explicit ctor (e.g. VfsPath(wchar_t_string)) This was SVN commit r9091.
This commit is contained in:
@@ -248,7 +248,7 @@ VfsPath CColladaManager::GetLoadableFilename(const VfsPath& pathnameNoExtension,
|
||||
const wchar_t* realDaePath = wcsstr(realDaeBuf, L"mods/");
|
||||
|
||||
// cachedPmdVfsPath is "cache/mods/whatever/art/meshes/whatever_{hash}.pmd"
|
||||
VfsPath cachedPmdVfsPath = Path::Join(L"cache/", realDaePath);
|
||||
VfsPath cachedPmdVfsPath = Path::Join("cache", VfsPath(realDaePath));
|
||||
cachedPmdVfsPath = Path::ChangeExtension(cachedPmdVfsPath, extension);
|
||||
|
||||
// If it's not in the cache, we'll have to create it first
|
||||
|
||||
Reference in New Issue
Block a user