summaryrefslogtreecommitdiffstats
path: root/util.cpp
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-05-18 13:09:47 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-05-18 13:09:47 +0200
commitad44f5a9e8021e2688c074ea43f123d41e229def (patch)
tree1b6cd79a2941afa08db60b0338c0ec1c1f88c4b8 /util.cpp
parentb89f4c4ab146361316602cfb4de31776a9c7d120 (diff)
cleanup, rework and clean wizard dialog added
Diffstat (limited to 'util.cpp')
-rw-r--r--util.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/util.cpp b/util.cpp
index 80172f77..c8234f2d 100644
--- a/util.cpp
+++ b/util.cpp
@@ -35,12 +35,20 @@ QString Util::findPasswordStore()
if (_env.contains("PASSWORD_STORE_DIR")) {
path = _env.value("PASSWORD_STORE_DIR");
} else {
- /* @TODO checks */
path = QDir::homePath()+"/.password-store/";
}
+ return Util::normalizeFolderPath(path);
+}
+
+
+QString Util::normalizeFolderPath(QString path) {
+ if (!path.endsWith("/") && !path.endsWith(QDir::separator())) {
+ path += '/';
+ }
return path;
}
+
QString Util::findBinaryInPath(QString binary)
{
initialiseEnvironment();