aboutsummaryrefslogtreecommitdiff
path: root/engines/composer
diff options
context:
space:
mode:
authorEugene Sandulenko2017-11-26 11:15:38 +0100
committerEugene Sandulenko2017-11-26 11:16:31 +0100
commitce0d29fc460e4e1a6bd1f780fb60c8b19bae992b (patch)
tree8fcc25c72eb5da59bcdc5d1bdf189e2e632cbf49 /engines/composer
parent5c39f31f750365f402c69a0592bb17ba6709d4eb (diff)
downloadscummvm-rg350-ce0d29fc460e4e1a6bd1f780fb60c8b19bae992b.tar.gz
scummvm-rg350-ce0d29fc460e4e1a6bd1f780fb60c8b19bae992b.tar.bz2
scummvm-rg350-ce0d29fc460e4e1a6bd1f780fb60c8b19bae992b.zip
COMPOSER: Properly strip down the relative paths
Diffstat (limited to 'engines/composer')
-rw-r--r--engines/composer/composer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index a04f4b650b..d85ec465b5 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -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] != ':')