Quazip relative bug fixed

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent 3a61b27bfc
commit 9655fa9957
  1. 13
      src/adaptors/UBImportCFF.cpp

@ -178,8 +178,6 @@ QString UBImportCFF::expandFileToDir(const QFile& pZipFile, const QString& pDir)
} }
QString newFileName = documentRootFolder + "/" + file.getActualFileName(); QString newFileName = documentRootFolder + "/" + file.getActualFileName();
bool ends = newFileName.endsWith('/');
if (!ends) {
QFileInfo newFileInfo(newFileName); QFileInfo newFileInfo(newFileName);
rootDir.mkpath(newFileInfo.absolutePath()); rootDir.mkpath(newFileInfo.absolutePath());
@ -187,16 +185,6 @@ QString UBImportCFF::expandFileToDir(const QFile& pZipFile, const QString& pDir)
out.setFileName(newFileName); out.setFileName(newFileName);
out.open(QIODevice::WriteOnly); out.open(QIODevice::WriteOnly);
// Slow like hell (on GNU/Linux at least), but it is not my fault.
// Not ZIP/UNZIP package's fault either.
// The slowest thing here is out.putChar(c).
QByteArray outFileContent = file.readAll();
if (out.write(outFileContent) == -1)
{
qWarning() << "Import failed. Cause: Unable to write file";
out.close();
return "";
}
while(file.getChar(&c)) while(file.getChar(&c))
out.putChar(c); out.putChar(c);
@ -218,7 +206,6 @@ QString UBImportCFF::expandFileToDir(const QFile& pZipFile, const QString& pDir)
return ""; return "";
} }
} }
}
zip.close(); zip.close();

Loading…
Cancel
Save