summaryrefslogtreecommitdiffstats
path: root/storemodel.cpp
diff options
context:
space:
mode:
authorAndrey Mazo <brouwer@annejan.com>2016-03-06 20:06:43 -0500
committerAndrey Mazo <ahippo@yandex.com>2016-03-07 08:58:56 +0300
commit4c7fa51c3845d7ef7a5150d7f18d2b1309d5fe65 (patch)
tree210bb1210c699236cffc65d05ee5826c02714038 /storemodel.cpp
parentf519a1fcb36b817deb8dfbce2fe3bf8cbf416ddc (diff)
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/<MyUser>/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.
Diffstat (limited to 'storemodel.cpp')
-rw-r--r--storemodel.cpp2
1 files changed, 1 insertions, 1 deletions
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;