From e536d8e60140199b8f7b4af3c1a333047a45b427 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 31 May 2016 16:14:51 +0100 Subject: [PATCH] Fixed bug not detecting unc pathes in osgDB::isAbsolutePath() --- src/osgDB/FileNameUtils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osgDB/FileNameUtils.cpp b/src/osgDB/FileNameUtils.cpp index 98234b146..39b4f5406 100644 --- a/src/osgDB/FileNameUtils.cpp +++ b/src/osgDB/FileNameUtils.cpp @@ -440,6 +440,7 @@ bool osgDB::isAbsolutePath(const std::string& path) { if (path[0] == '/') return true; // Now test for Windows root if (path.length()<2) return false; + if (path[0] == '\\' && path[1] == '\\') return true; return path[1] == ':'; // We should check that path[0] is a letter, but as ':' is invalid in paths in other cases, that's not a problem. }