diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-18 13:09:47 +0200 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-05-18 13:09:47 +0200 |
commit | ad44f5a9e8021e2688c074ea43f123d41e229def (patch) | |
tree | 1b6cd79a2941afa08db60b0338c0ec1c1f88c4b8 /util.cpp | |
parent | b89f4c4ab146361316602cfb4de31776a9c7d120 (diff) |
cleanup, rework and clean wizard dialog added
Diffstat (limited to 'util.cpp')
-rw-r--r-- | util.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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(); |