History

update windows absolute path checking to allow forward slash

Jack Atherton committed 4 years ago

Commit fc7579d1 parent f59bfd71 file · +2 −2Browse files

Showing the changes to src/core/util_string.cpp (1 of 1 file). Show all

Unified · Split

src/core/util_string.cpp+2−2
@@ -675,8 +675,8 @@ t_CKBOOL str_endsin( const char * str, const char * end ) · 674 unmodified lines
675675 t_CKBOOL is_absolute_path( const std::string & path )
676676 {
677677 #ifdef __PLATFORM_WIN32__
678− // a little more involved in windows
679− if( path.length() >= 3 && path[1] == ':' && path[2] == '\\' )
678+ // a little more involved in windows: [letter]:[/ or \]
679+ if( path.length() >= 3 && path[1] == ':' && ( path[2] == '\\' || path[2] == '/' ) )
680680 {
681681 // check drive letter (apparently windows limited to 26 drive letters)
682682 if( (path[0] >= 'a' && path[0] <= 'z') || (path[0] >= 'A' && path[0] <= 'Z') )

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t