mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 04:01:53 +02:00
Fix rootdir check.
This commit is contained in:
parent
8c31ceeb26
commit
dd0c4eb72a
@ -181,7 +181,7 @@ bool DirDialog::exec() {
|
|||||||
|
|
||||||
void DirDialog::up() {
|
void DirDialog::up() {
|
||||||
string::size_type p = path.rfind("/");
|
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;
|
close = true;
|
||||||
result = false;
|
result = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -149,7 +149,7 @@ int Selector::exec(int startSelection) {
|
|||||||
if ( gmenu2x->input[ACTION_X] ) {
|
if ( gmenu2x->input[ACTION_X] ) {
|
||||||
if (link->getSelectorBrowser()) {
|
if (link->getSelectorBrowser()) {
|
||||||
string::size_type p = dir.rfind("/", dir.size()-2);
|
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;
|
close = true;
|
||||||
result = false;
|
result = false;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user