mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-04 23:37:10 +02:00
Fix rootdir check.
This commit is contained in:
parent
8c31ceeb26
commit
dd0c4eb72a
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user