mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-27 11:21:45 +02:00
Create the "sections" user directory if required, when creating a new link.
It previously assumed that this directory was present, which isn't the case all the time.
This commit is contained in:
parent
81a607c36e
commit
4636a84eef
@ -204,7 +204,11 @@ bool Menu::addLink(string path, string file, string section) {
|
||||
title = title.substr(0, pos);
|
||||
}
|
||||
|
||||
string linkpath = GMenu2X::getHome()+"/sections/"+section;
|
||||
string linkpath = GMenu2X::getHome() + "/sections";
|
||||
if (!fileExists(linkpath))
|
||||
mkdir(linkpath.c_str(), 0755);
|
||||
|
||||
linkpath = GMenu2X::getHome() + "/sections/" + section;
|
||||
if (!fileExists(linkpath))
|
||||
mkdir(linkpath.c_str(), 0755);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user