Commit df70a870 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix loading vector layers when kzip mangled the paths on saving

We have to substitute the image name with the actual folder we find in the file
, which might be different, because kzip is crap at encodings. But we also
should be careful when comparing the layer's path with what we expect so we don't
double up the path to the file we want to read

parent 2f31a94a
......@@ -207,10 +207,6 @@ bool KoQuaZipStore::openRead(const QString &name)
QString fixedPath = name;
fixedPath.replace("//", "/");
if (!d->substituteThis.isEmpty()) {
fixedPath = fixedPath.replace(d->substituteThis, d->substituteWith);
delete d->stream;
d->stream = 0;
delete dd->currentFile;
......@@ -220,6 +216,9 @@ bool KoQuaZipStore::openRead(const QString &name)
fixedPath = currentPath() + '/' + fixedPath;
if (!d->substituteThis.isEmpty()) {
fixedPath = fixedPath.replace(d->substituteThis, d->substituteWith);
if (!dd->archive->setCurrentFile(fixedPath)) {
qWarning() << "\t\tCould not set current file" << dd->archive->getZipError() << fixedPath;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment