mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 11:46:14 +02:00
browserdialog: Better path handling.
This commit is contained in:
parent
7b66eb36d6
commit
a37ed02f8f
@ -35,7 +35,7 @@ bool BrowseDialog::exec()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
string path = fl->getPath();
|
string path = fl->getPath();
|
||||||
if (path.empty() || !fileExists(path))
|
if (path.empty() || !fileExists(path) || path.compare(0, 5, "/card") != 0)
|
||||||
setPath("/card");
|
setPath("/card");
|
||||||
|
|
||||||
fl->browse();
|
fl->browse();
|
||||||
@ -169,7 +169,12 @@ void BrowseDialog::directoryUp()
|
|||||||
|
|
||||||
void BrowseDialog::directoryEnter()
|
void BrowseDialog::directoryEnter()
|
||||||
{
|
{
|
||||||
setPath(fl->getPath() + "/" + fl->at(selected));
|
string path = fl->getPath();
|
||||||
|
if (path[path.size()-1] != '/')
|
||||||
|
path += "/";
|
||||||
|
|
||||||
|
setPath(path + fl->at(selected));
|
||||||
|
|
||||||
selected = 0;
|
selected = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user