1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-04 21:26:23 +03: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:
Ayla 2011-07-25 12:05:24 +02:00
parent 81a607c36e
commit 4636a84eef

View File

@ -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);