]> git.tdb.fi Git - libs/core.git/commitdiff
Fix Path::is_absolute for empty paths on Windows
authorMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:18:42 +0000 (12:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:18:42 +0000 (12:18 +0300)
source/fs/path.cpp

index d68595bb55ee83588ce9ae7a535c9424cbbaabef..bd107f1378f128e813a646b9ad7d4a05516de2d7 100644 (file)
@@ -59,7 +59,7 @@ unsigned Path::size() const
 bool Path::is_absolute() const
 {
 #ifdef _WIN32
-       if(is_windows_drive((*this)[0]))
+       if(!empty() && is_windows_drive((*this)[0]))
                return true;
 #endif
        return path[0]==DIRSEP;