Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
Fix autostart dir detection when the env var is set
Browse files Browse the repository at this point in the history
  • Loading branch information
amoskvin committed Sep 18, 2012
1 parent 648f7fe commit a209c33
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/qtxdg/xdgdirs.cpp
Expand Up @@ -153,7 +153,15 @@ QString XdgDirs::runtimeDir()
************************************************/
QString XdgDirs::autostartHome(bool createDir)
{
return xdgSingleDir("XDG_DATA_HOME", ".config/autostart", createDir);
QDir dir(QString("%1/autostart").arg(configHome(createDir)));

if (createDir && !dir.exists())
{
if (!dir.mkpath("."))
qWarning() << QString("Can't create %1 directory.").arg(dir.absolutePath());
}

return dir.absolutePath();
}


Expand Down

0 comments on commit a209c33

Please sign in to comment.