browser: if current dir doesn't exists, go down one level automatically
This commit is contained in:
@@ -372,6 +372,12 @@ std::string ExtractTopName(const std::string &s)
|
||||
return slash != std::string::npos ? s.substr(++slash) : s;
|
||||
}
|
||||
|
||||
std::string PathGoDownOneLevel(const std::string &path)
|
||||
{
|
||||
size_t i = path.rfind('/');
|
||||
return i == std::string::npos ? "/" : path.substr(0, i);
|
||||
}
|
||||
|
||||
std::basic_string<my_char_t> Scroller(const std::basic_string<my_char_t> &str, size_t &pos, size_t width)
|
||||
{
|
||||
std::basic_string<my_char_t> s(str);
|
||||
|
||||
Reference in New Issue
Block a user