File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1089,7 +1089,7 @@ namespace path
10891089 void splitdrive_nt (std::string & drivespec, std::string & pathspec,
10901090 const std::string & p)
10911091 {
1092- if ( pystring::slice (p, 1 , 2 ) == colon )
1092+ if (p. size () >= 2 && p[ 1 ] == ' : ' )
10931093 {
10941094 std::string path = p; // In case drivespec == p
10951095 drivespec = pystring::slice (path, 0 , 2 );
@@ -1209,8 +1209,8 @@ namespace path
12091209 // 4. join('c:', 'd:/') = 'd:/'
12101210 // 5. join('c:/', 'd:/') = 'd:/'
12111211
1212- if ( ( pystring::slice (path, 1 , 2 ) != colon) ||
1213- ( pystring::slice (b, 1 , 2 ) == colon) )
1212+
1213+ if ((path. size () >= 2 && path[ 1 ] != ' : ' ) || (b. size () >= 2 && b[ 1 ] == ' : ' ) )
12141214 {
12151215 // Path doesnt start with a drive letter
12161216 b_nts = true ;
You can’t perform that action at this time.
0 commit comments