Hopefully This Works™

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-05-13 18:58:05 +01:00
parent 129e959a3b
commit 18cfe219fe

View File

@ -129,12 +129,7 @@ bool FileIgnoreProxy::setData(const QModelIndex& index, const QVariant& value, i
QString FileIgnoreProxy::relPath(const QString& path) const QString FileIgnoreProxy::relPath(const QString& path) const
{ {
QString prefix = QDir().absoluteFilePath(root); return QDir(root).relativeFilePath(path);
prefix += '/';
if (!path.startsWith(prefix)) {
return QString();
}
return path.mid(prefix.size());
} }
bool FileIgnoreProxy::setFilterState(QModelIndex index, Qt::CheckState state) bool FileIgnoreProxy::setFilterState(QModelIndex index, Qt::CheckState state)