mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
COMPOSER: Properly strip down the relative paths
This commit is contained in:
parent
5c39f31f75
commit
ce0d29fc46
@ -355,6 +355,10 @@ Common::String ComposerEngine::mangleFilename(Common::String filename) {
|
||||
filename = filename.c_str() + 1;
|
||||
|
||||
uint slashesToStrip = _directoriesToStrip;
|
||||
|
||||
if (filename.hasPrefix(".."))
|
||||
slashesToStrip = 1;
|
||||
|
||||
while (slashesToStrip--) {
|
||||
for (uint i = 0; i < filename.size(); i++) {
|
||||
if (filename[i] != '\\' && filename[i] != ':')
|
||||
|
Loading…
x
Reference in New Issue
Block a user