mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
file access cross-platform compatibility fixes
This commit is contained in:
@@ -334,3 +334,12 @@ erase_extension( std::string &Filename ) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// potentially replaces backward slashes in provided file path with unix-compatible forward slashes
|
||||
void
|
||||
replace_slashes( std::string &Filename ) {
|
||||
|
||||
std::replace(
|
||||
std::begin( Filename ), std::end( Filename ),
|
||||
'\\', '/' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user