Commit 63948c70 authored by Simon Persson's avatar Simon Persson

Go back to storing index in the backup.

There was a bug in there, old leftovers made it only run init on the target but not in users homedir. Did not like the ever-growing index file in home directory anyway, go back to storing it in the destination.
Fixes #17.
parent 2252dc2c
......@@ -25,8 +25,8 @@
#include <QTimer>
BupJob::BupJob(const QStringList &pPathsIncluded, const QStringList &pPathsExcluded,
const QString &pDestinationPath, const QString &pBupPath)
:BackupJob(pPathsIncluded, pPathsExcluded, pDestinationPath), mBupPath(pBupPath)
const QString &pDestinationPath)
:BackupJob(pPathsIncluded, pPathsExcluded, pDestinationPath)
{
mIndexProcess.setOutputChannelMode(KProcess::SeparateChannels);
mSaveProcess.setOutputChannelMode(KProcess::SeparateChannels);
......@@ -63,9 +63,7 @@ void BupJob::startIndexing() {
}
mIndexProcess << QLatin1String("bup");
if(!mBupPath.isEmpty()) {
mIndexProcess << QLatin1String("-d") << mBupPath;
}
mIndexProcess << QLatin1String("-d") << mDestinationPath;
mIndexProcess << QLatin1String("index") << QLatin1String("-u");
foreach(QString lExclude, mPathsExcluded) {
......@@ -93,12 +91,9 @@ void BupJob::slotIndexingDone(int pExitCode, QProcess::ExitStatus pExitStatus) {
}
mSaveProcess << QLatin1String("bup");
if(!mBupPath.isEmpty()) {
mSaveProcess << QLatin1String("-d") << mBupPath;
}
mSaveProcess << QLatin1String("-d") << mDestinationPath;
mSaveProcess << QLatin1String("save");
mSaveProcess << QLatin1String("-n") << QLatin1String("kup");
mSaveProcess << QLatin1String("-r") << mDestinationPath;
mSaveProcess << mPathsIncluded;
connect(&mSaveProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(slotSavingDone(int,QProcess::ExitStatus)));
......
......@@ -31,7 +31,7 @@ class BupJob : public BackupJob
public:
BupJob(const QStringList &pPathsIncluded, const QStringList &pPathsExcluded,
const QString &pDestinationPath, const QString &pBupPath = QString());
const QString &pDestinationPath);
virtual void start();
protected slots:
......@@ -44,7 +44,6 @@ protected slots:
protected:
KProcess mIndexProcess;
KProcess mSaveProcess;
QString mBupPath;
QString mBupVersion;
};
......
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