mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Ensure path always ends with path separator when moving to parent in GUI
This commit is contained in:
parent
015d599213
commit
d13b28c34c
@ -166,6 +166,8 @@ bool FiosBrowseTo(const FiosItem *item)
|
||||
s = _fios_path->find_last_of(PATHSEPCHAR);
|
||||
if (s != std::string::npos) {
|
||||
_fios_path->erase(s + 1); // go up a directory
|
||||
} else {
|
||||
*_fios_path += PATHSEP; // Add trailing path separator if there isn't one
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user