fix: path may not correct when decide if a file is in repository
This commit is contained in:
parent
fc27be6ae5
commit
ad20f8df3f
|
@ -1,6 +1,8 @@
|
|||
#include "gitrepository.h"
|
||||
#include "gitmanager.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
GitRepository::GitRepository(const QString& folder, QObject *parent)
|
||||
: QObject{parent},
|
||||
mInRepository(false)
|
||||
|
@ -109,8 +111,9 @@ const QString &GitRepository::realFolder() const
|
|||
void GitRepository::convertFilesListToSet(const QStringList &filesList, QSet<QString> &set)
|
||||
{
|
||||
set.clear();
|
||||
QDir dir(mRealFolder);
|
||||
foreach (const QString& s, filesList) {
|
||||
set.insert(includeTrailingPathDelimiter(mRealFolder)+s);
|
||||
set.insert(dir.absoluteFilePath(s));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue