Fix the String::get_base_dir()
logic to properly check for top level directories on Windows.
This commit is contained in:
parent
9c3293b844
commit
94aa09a854
1 changed files with 4 additions and 1 deletions
|
@ -3970,7 +3970,10 @@ bool String::is_rel_path() const {
|
||||||
|
|
||||||
String String::get_base_dir() const {
|
String String::get_base_dir() const {
|
||||||
|
|
||||||
int basepos = find("://");
|
int basepos = find(":/");
|
||||||
|
if (basepos == -1) {
|
||||||
|
basepos = find(":\\");
|
||||||
|
}
|
||||||
String rs;
|
String rs;
|
||||||
String base;
|
String base;
|
||||||
if (basepos != -1) {
|
if (basepos != -1) {
|
||||||
|
|
Loading…
Reference in a new issue