From 4c7fa51c3845d7ef7a5150d7f18d2b1309d5fe65 Mon Sep 17 00:00:00 2001 From: Andrey Mazo Date: Sun, 6 Mar 2016 20:06:43 -0500 Subject: Fix pass-name in commit message on Windows Fix removal of path of a password store on Windows. Before the change: "Add for C:/Users//password-store/zzz/qqq using QtPass." After the change: "Add for zzz/qqq using QtPass." And the same for "Remove" messages. Use the same removal method in store model too. --- storemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storemodel.cpp') diff --git a/storemodel.cpp b/storemodel.cpp index ada0540e..8e7d8345 100644 --- a/storemodel.cpp +++ b/storemodel.cpp @@ -41,8 +41,8 @@ bool StoreModel::ShowThis(const QModelIndex index) const { } else { QModelIndex useIndex = sourceModel()->index(index.row(), 0, index.parent()); QString path = fs->filePath(useIndex); + path = QDir(store).relativeFilePath(path); path.replace(QRegExp("\\.gpg$"), ""); - path.replace(QRegExp("^" + store), ""); retVal = path.contains(filterRegExp()); } return retVal; -- cgit v1.2.3