diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-10-29 17:17:49 +0100 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-10-29 17:17:49 +0100 |
commit | 59eb45717445445d36923da93ac8c841eb002178 (patch) | |
tree | 13c5d52a1afa8c16609b06477fbff5bc21896c38 | |
parent | 0e02d25001735e6e76a3d578d6db6c4bb36ea927 (diff) |
hidden folder on windows not a .folder
-rw-r--r-- | dialog.cpp | 3 | ||||
-rw-r--r-- | util.cpp | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -562,6 +562,9 @@ void Dialog::wizard() tr("Would you like to create a password-store at %1?").arg(passStore), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QDir().mkdir(passStore); +#ifdef Q_OS_WIN + SetFileAttributes(passStore, FILE_ATTRIBUTE_HIDDEN); +#endif if(useGit()) { mainWindow->executePassGitInit(); } @@ -45,7 +45,11 @@ QString Util::findPasswordStore() if (_env.contains("PASSWORD_STORE_DIR")) { path = _env.value("PASSWORD_STORE_DIR"); } else { +#ifdef Q_OS_WIN + path = QDir::homePath() + QDir::separator() + "password-store" + QDir::separator(); +#else path = QDir::homePath() + QDir::separator() + ".password-store" + QDir::separator(); +#endif } return Util::normalizeFolderPath(path); } |