Utilities: Handle missing XDG_DATA_DIRS variable
This commit is contained in:
parent
05c4d23df6
commit
c00d95242d
|
@ -50,7 +50,11 @@ void OpenInFileManager(const QString &path, const QUrl &url) {
|
||||||
#endif
|
#endif
|
||||||
proc.waitForFinished();
|
proc.waitForFinished();
|
||||||
QString desktop_file = proc.readLine().simplified();
|
QString desktop_file = proc.readLine().simplified();
|
||||||
QStringList data_dirs = QString(qgetenv("XDG_DATA_DIRS")).split(":");
|
QString xdg_data_dirs = QString(qgetenv("XDG_DATA_DIRS"));
|
||||||
|
if (xdg_data_dirs.isEmpty()) {
|
||||||
|
xdg_data_dirs = "/usr/local/share/:/usr/share/";
|
||||||
|
}
|
||||||
|
QStringList data_dirs = xdg_data_dirs.split(":");
|
||||||
|
|
||||||
QString command;
|
QString command;
|
||||||
QStringList command_params;
|
QStringList command_params;
|
||||||
|
|
Loading…
Reference in New Issue