Fossil SCM
Fix preprocessor check for Win32/Cygwin in file_simplify_name().
Commit
9e602271f42b248632c984b9d231640ebbb1330d
Parent
b72ef38d1b98ac6…
1 file changed
+1
-1
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -594,11 +594,11 @@ | ||
| 594 | 594 | int file_simplify_name(char *z, int n, int slash){ |
| 595 | 595 | int i, j; |
| 596 | 596 | if( n<0 ) n = strlen(z); |
| 597 | 597 | |
| 598 | 598 | /* On windows and cygwin convert all \ characters to / */ |
| 599 | -#if defined(_WIN32) && defined(__CYGWIN__) | |
| 599 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 600 | 600 | for(i=0; i<n; i++){ |
| 601 | 601 | if( z[i]=='\\' ) z[i] = '/'; |
| 602 | 602 | } |
| 603 | 603 | #endif |
| 604 | 604 | |
| 605 | 605 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -594,11 +594,11 @@ | |
| 594 | int file_simplify_name(char *z, int n, int slash){ |
| 595 | int i, j; |
| 596 | if( n<0 ) n = strlen(z); |
| 597 | |
| 598 | /* On windows and cygwin convert all \ characters to / */ |
| 599 | #if defined(_WIN32) && defined(__CYGWIN__) |
| 600 | for(i=0; i<n; i++){ |
| 601 | if( z[i]=='\\' ) z[i] = '/'; |
| 602 | } |
| 603 | #endif |
| 604 | |
| 605 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -594,11 +594,11 @@ | |
| 594 | int file_simplify_name(char *z, int n, int slash){ |
| 595 | int i, j; |
| 596 | if( n<0 ) n = strlen(z); |
| 597 | |
| 598 | /* On windows and cygwin convert all \ characters to / */ |
| 599 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 600 | for(i=0; i<n; i++){ |
| 601 | if( z[i]=='\\' ) z[i] = '/'; |
| 602 | } |
| 603 | #endif |
| 604 | |
| 605 |