GUI: Fix "Go up"

OneDrive and Google Drive paths do not start with '/', so one was unable
to go up to root.
This commit is contained in:
Alexander Tkachev 2016-07-04 12:05:10 +06:00
parent 72b82bd2aa
commit e388accda3

View File

@ -183,7 +183,7 @@ void RemoteBrowserDialog::goUp() {
return;
}
for (int i = path.size()-1; i >= 0; --i)
if (path[i] == '/' || path[i] == '\\') {
if (i == 0 || path[i] == '/' || path[i] == '\\') {
path.erase(i);
break;
}