mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Replace characters that NTFS and HFS can't handle with '-'. Should fix issue 3443.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6545 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
06013d5eec
commit
2ae7f7f01f
@ -22,6 +22,7 @@
|
||||
|
||||
#include "WII_IPC_HLE_Device_fs.h"
|
||||
#include "WII_IPC_HLE_Device_FileIO.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
// This is used by several of the FileIO and /dev/fs/ functions
|
||||
@ -32,7 +33,16 @@ std::string HLE_IPC_BuildFilename(const char* _pFilename, int _size)
|
||||
|
||||
std::string Filename = std::string(File::GetUserPath(D_WIIROOT_IDX));
|
||||
if (Buffer[1] == '0')
|
||||
Filename += std::string("/title"); // this looks and feel like a hack...
|
||||
Filename += std::string("/title"); // this looks and feel like a hack...
|
||||
|
||||
// Replaces chars that NTFS can't support with '-'. TODO '/', '\' ?
|
||||
std::replace(Buffer, Buffer + _size, '"', '-');
|
||||
std::replace(Buffer, Buffer + _size, '*', '-');
|
||||
std::replace(Buffer, Buffer + _size, ':', '-');
|
||||
std::replace(Buffer, Buffer + _size, '<', '-');
|
||||
std::replace(Buffer, Buffer + _size, '>', '-');
|
||||
std::replace(Buffer, Buffer + _size, '?', '-');
|
||||
std::replace(Buffer, Buffer + _size, '|', '-');
|
||||
|
||||
Filename += Buffer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user