Fossil SCM
Fix file_is_absolute_path(), accounting for "C:" being an absolute path
Commit
573bbd3eb94b7d3f64bea1edff4fc0b17839dda0
Parent
f99848e04832e6b…
1 file changed
+1
-1
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -814,11 +814,11 @@ | ||
| 814 | 814 | int file_is_absolute_path(const char *zPath){ |
| 815 | 815 | if( zPath[0]=='/' |
| 816 | 816 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 817 | 817 | || zPath[0]=='\\' |
| 818 | 818 | || (fossil_isalpha(zPath[0]) && zPath[1]==':' |
| 819 | - && (zPath[2]=='\\' || zPath[2]=='/')) | |
| 819 | + && (zPath[2]=='\\' || zPath[2]=='/' || zPath[2]=='\0')) | |
| 820 | 820 | #endif |
| 821 | 821 | ){ |
| 822 | 822 | return 1; |
| 823 | 823 | }else{ |
| 824 | 824 | return 0; |
| 825 | 825 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -814,11 +814,11 @@ | |
| 814 | int file_is_absolute_path(const char *zPath){ |
| 815 | if( zPath[0]=='/' |
| 816 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 817 | || zPath[0]=='\\' |
| 818 | || (fossil_isalpha(zPath[0]) && zPath[1]==':' |
| 819 | && (zPath[2]=='\\' || zPath[2]=='/')) |
| 820 | #endif |
| 821 | ){ |
| 822 | return 1; |
| 823 | }else{ |
| 824 | return 0; |
| 825 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -814,11 +814,11 @@ | |
| 814 | int file_is_absolute_path(const char *zPath){ |
| 815 | if( zPath[0]=='/' |
| 816 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 817 | || zPath[0]=='\\' |
| 818 | || (fossil_isalpha(zPath[0]) && zPath[1]==':' |
| 819 | && (zPath[2]=='\\' || zPath[2]=='/' || zPath[2]=='\0')) |
| 820 | #endif |
| 821 | ){ |
| 822 | return 1; |
| 823 | }else{ |
| 824 | return 0; |
| 825 |