mirror of https://github.com/kiwix/libkiwix.git
+ improvement of isRelativePath()
This commit is contained in:
parent
39c44c578c
commit
e06af8e68f
|
@ -89,9 +89,9 @@ namespace kiwix {
|
||||||
|
|
||||||
bool Manager::isRelativePath(const string &path) {
|
bool Manager::isRelativePath(const string &path) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return path.substr(1, 2) == ":\\" ? false : true;
|
return path.empty() || path.substr(1, 2) == ":\\" ? false : true;
|
||||||
#else
|
#else
|
||||||
return path.substr(0, 1) == "/" ? false : true;
|
return path.empty() || path.substr(0, 1) == "/" ? false : true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue