Commit 6b8e7705 authored by Simon Persson's avatar Simon Persson

Better handling of relative path argument to filedigger

If you gave a relative path to bup repo as command line argument for
kup-filedigger then it would work OK until you tried to open a file or
folder with external program. Solve problem by making sure repo path is
absolute, first thing.

BUG: 425693
parent a97b6a6b
......@@ -13,6 +13,7 @@
#include <QApplication>
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QDir>
#include <QFile>
#include <QTextStream>
......@@ -42,7 +43,8 @@ int main(int pArgCount, char **pArgArray) {
QString lRepoPath;
QStringList lPosArgs = lParser.positionalArguments();
if(!lPosArgs.isEmpty()) {
lRepoPath = lPosArgs.takeFirst();
auto lDir = QDir(lPosArgs.takeFirst());
lRepoPath = lDir.absolutePath();
}
// This needs to be called first thing, before any other calls to libgit2.
......
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