forked from Silverfish/proton-bridge
Other: Apply bridge style to community commit.
This commit is contained in:
@ -84,12 +84,13 @@ QString userConfigDir()
|
|||||||
dir += "/Library/Application Support";
|
dir += "/Library/Application Support";
|
||||||
#else
|
#else
|
||||||
dir = qgetenv ("XDG_CONFIG_HOME");
|
dir = qgetenv ("XDG_CONFIG_HOME");
|
||||||
if (dir.isEmpty()) {
|
if (dir.isEmpty())
|
||||||
dir = qgetenv ("HOME");
|
{
|
||||||
|
dir = qgetenv ("HOME");
|
||||||
if (dir.isEmpty())
|
if (dir.isEmpty())
|
||||||
throw Exception("neither $XDG_CONFIG_HOME nor $HOME are defined");
|
throw Exception("neither $XDG_CONFIG_HOME nor $HOME are defined");
|
||||||
dir += "/.config";
|
dir += "/.config";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
QString const folder = QDir(dir).absoluteFilePath(configFolder);
|
QString const folder = QDir(dir).absoluteFilePath(configFolder);
|
||||||
QDir().mkpath(folder);
|
QDir().mkpath(folder);
|
||||||
@ -116,12 +117,13 @@ QString userCacheDir()
|
|||||||
dir += "/Library/Caches";
|
dir += "/Library/Caches";
|
||||||
#else
|
#else
|
||||||
dir = qgetenv ("XDG_CACHE_HOME");
|
dir = qgetenv ("XDG_CACHE_HOME");
|
||||||
if (dir.isEmpty()) {
|
if (dir.isEmpty())
|
||||||
dir = qgetenv ("HOME");
|
{
|
||||||
|
dir = qgetenv ("HOME");
|
||||||
if (dir.isEmpty())
|
if (dir.isEmpty())
|
||||||
throw Exception("neither XDG_CACHE_HOME nor $HOME are defined");
|
throw Exception("neither XDG_CACHE_HOME nor $HOME are defined");
|
||||||
dir += "/.cache";
|
dir += "/.cache";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString const folder = QDir(dir).absoluteFilePath(configFolder);
|
QString const folder = QDir(dir).absoluteFilePath(configFolder);
|
||||||
|
|||||||
Reference in New Issue
Block a user