Add the default config path on macOS

This commit is contained in:
Chih-Hsuan Yen 2019-07-18 11:07:37 +08:00
parent 829e79929e
commit a92ec9e546
No known key found for this signature in database
GPG Key ID: F98EF2A7B0A098AE
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ QString SyncthingConfig::locateConfigFile()
if (path.isEmpty()) {
path = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("Syncthing/config.xml"));
}
// The default Syncthing config path on macOS. The full path is "$HOME/Library/Application Support/Syncthing/config.xml".
if (path.isEmpty()) {
path = QStandardPaths::locate(QStandardPaths::RuntimeLocation, QStringLiteral("Syncthing/config.xml"));
}
return path;
}