+ improvement of isRelativePath()

This commit is contained in:
kelson42 2011-09-03 14:50:11 +00:00
parent 39c44c578c
commit e06af8e68f
1 changed files with 2 additions and 2 deletions

View File

@ -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
}