Fossil SCM

Fix preprocessor check for Win32/Cygwin in file_simplify_name().

mistachkin 2013-02-26 20:50 trunk
Commit 9e602271f42b248632c984b9d231640ebbb1330d
1 file changed +1 -1
+1 -1
--- src/file.c
+++ src/file.c
@@ -594,11 +594,11 @@
594594
int file_simplify_name(char *z, int n, int slash){
595595
int i, j;
596596
if( n<0 ) n = strlen(z);
597597
598598
/* On windows and cygwin convert all \ characters to / */
599
-#if defined(_WIN32) && defined(__CYGWIN__)
599
+#if defined(_WIN32) || defined(__CYGWIN__)
600600
for(i=0; i<n; i++){
601601
if( z[i]=='\\' ) z[i] = '/';
602602
}
603603
#endif
604604
605605
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button