1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 12:48:26 +02:00

Fix rootdir check.

This commit is contained in:
Lars-Peter Clausen 2010-05-03 14:15:15 +02:00
parent 8c31ceeb26
commit dd0c4eb72a
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ bool DirDialog::exec() {
void DirDialog::up() {
string::size_type p = path.rfind("/");
if (p==string::npos || path.substr(0,11)!="/card" || p<4) {
if (p==string::npos || path.compare(0, 5, "/card") != 0 || p<4) {
close = true;
result = false;
} else {

View File

@ -149,7 +149,7 @@ int Selector::exec(int startSelection) {
if ( gmenu2x->input[ACTION_X] ) {
if (link->getSelectorBrowser()) {
string::size_type p = dir.rfind("/", dir.size()-2);
if (p==string::npos || dir.substr(0,4)!="/card" || p<4) {
if (p==string::npos || dir.compare(0, 5, "/card") != 0 || p<4) {
close = true;
result = false;
} else {