mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
+ improvement of isRelativePath()
This commit is contained in:
@ -89,9 +89,9 @@ namespace kiwix {
|
||||
|
||||
bool Manager::isRelativePath(const string &path) {
|
||||
#ifdef _WIN32
|
||||
return path.substr(1, 2) == ":\\" ? false : true;
|
||||
return path.empty() || path.substr(1, 2) == ":\\" ? false : true;
|
||||
#else
|
||||
return path.substr(0, 1) == "/" ? false : true;
|
||||
return path.empty() || path.substr(0, 1) == "/" ? false : true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user