mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
ark: set the KArchive temporary prefix to the global working directory
fixes creating of archives with large files that cannot fit in /tmp (or whatever the temporary directory is set to). note that this still depends on how much space is available on the filesystem the archive is created on and will not work for remote archives - remote archives will have to be fetched somewhere with enough space to hold the archive and a copy of it (possibly $HOME) but that is for another commit (currently archives are fetched into /tmp but not uploaded upon modification) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9fa6942480
commit
6eba0a9eeb
1 changed files with 7 additions and 1 deletions
|
@ -161,7 +161,7 @@ bool LibArchiveInterface::addFiles(const QStringList &files, const CompressionOp
|
|||
{
|
||||
const QString globalWorkDir = options.value(QLatin1String("GlobalWorkDir")).toString();
|
||||
if (!globalWorkDir.isEmpty()) {
|
||||
kDebug() << "GlobalWorkDir is set, changing dir to " << globalWorkDir;
|
||||
kDebug() << "GlobalWorkDir is set, changing dir to" << globalWorkDir;
|
||||
QDir::setCurrent(globalWorkDir);
|
||||
}
|
||||
|
||||
|
@ -181,6 +181,12 @@ bool LibArchiveInterface::addFiles(const QStringList &files, const CompressionOp
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!globalWorkDir.isEmpty()) {
|
||||
const QString tempprefix(QDir::cleanPath(globalWorkDir) + QDir::separator() + QLatin1String("ark-"));
|
||||
kDebug() << "GlobalWorkDir is set, setting temporary prefix to" << tempprefix;
|
||||
karchive.setTempPrefix(tempprefix);
|
||||
}
|
||||
|
||||
const QList<KArchiveEntry> oldEntries = karchive.list();
|
||||
const QString strip(QDir::cleanPath(globalWorkDir) + QDir::separator());
|
||||
connect(&karchive, SIGNAL(progress(qreal)), this, SLOT(emitProgress(qreal)));
|
||||
|
|
Loading…
Add table
Reference in a new issue