Fossil SCM
Get the "fossil all ui" command working on Cygwin where the global_config table has "repo:" entries containing the windows drive letter
Commit
eb9b2317d57191959cc436399228f92b369cb9ae
Parent
25758c7b1c8319a…
4 files changed
+2
-2
+2
-2
No diff available
No diff available
+2
-2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -1440,14 +1440,14 @@ | ||
| 1440 | 1440 | |
| 1441 | 1441 | /* |
| 1442 | 1442 | ** Remove surplus "/" characters from the beginning of a full pathname. |
| 1443 | 1443 | ** Extra leading "/" characters are benign on unix. But on Windows |
| 1444 | 1444 | ** machines, they must be removed. Example: Convert "/C:/fossil/xyx.fossil" |
| 1445 | -** into "c:/fossil/xyz.fossil". | |
| 1445 | +** into "C:/fossil/xyz.fossil". Cygwin should behave as Windows here. | |
| 1446 | 1446 | */ |
| 1447 | 1447 | const char *file_cleanup_fullpath(const char *z){ |
| 1448 | -#ifdef _WIN32 | |
| 1448 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 1449 | 1449 | if( z[0]=='/' && fossil_isalpha(z[1]) && z[2]==':' && z[3]=='/' ) z++; |
| 1450 | 1450 | #else |
| 1451 | 1451 | while( z[0]=='/' && z[1]=='/' ) z++; |
| 1452 | 1452 | #endif |
| 1453 | 1453 | return z; |
| 1454 | 1454 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1440,14 +1440,14 @@ | |
| 1440 | |
| 1441 | /* |
| 1442 | ** Remove surplus "/" characters from the beginning of a full pathname. |
| 1443 | ** Extra leading "/" characters are benign on unix. But on Windows |
| 1444 | ** machines, they must be removed. Example: Convert "/C:/fossil/xyx.fossil" |
| 1445 | ** into "c:/fossil/xyz.fossil". |
| 1446 | */ |
| 1447 | const char *file_cleanup_fullpath(const char *z){ |
| 1448 | #ifdef _WIN32 |
| 1449 | if( z[0]=='/' && fossil_isalpha(z[1]) && z[2]==':' && z[3]=='/' ) z++; |
| 1450 | #else |
| 1451 | while( z[0]=='/' && z[1]=='/' ) z++; |
| 1452 | #endif |
| 1453 | return z; |
| 1454 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1440,14 +1440,14 @@ | |
| 1440 | |
| 1441 | /* |
| 1442 | ** Remove surplus "/" characters from the beginning of a full pathname. |
| 1443 | ** Extra leading "/" characters are benign on unix. But on Windows |
| 1444 | ** machines, they must be removed. Example: Convert "/C:/fossil/xyx.fossil" |
| 1445 | ** into "C:/fossil/xyz.fossil". Cygwin should behave as Windows here. |
| 1446 | */ |
| 1447 | const char *file_cleanup_fullpath(const char *z){ |
| 1448 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1449 | if( z[0]=='/' && fossil_isalpha(z[1]) && z[2]==':' && z[3]=='/' ) z++; |
| 1450 | #else |
| 1451 | while( z[0]=='/' && z[1]=='/' ) z++; |
| 1452 | #endif |
| 1453 | return z; |
| 1454 |
+2
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1321,11 +1321,11 @@ | ||
| 1321 | 1321 | i64 szFile; /* File size of the candidate repository */ |
| 1322 | 1322 | |
| 1323 | 1323 | i = zPathInfo[0]!=0; |
| 1324 | 1324 | if( fossil_strcmp(g.zRepositoryName, "/")==0 ){ |
| 1325 | 1325 | zBase++; |
| 1326 | -#ifdef _WIN32 | |
| 1326 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 1327 | 1327 | if( sqlite3_strglob("/[a-zA-Z]:/*", zPathInfo)==0 ) i = 4; |
| 1328 | 1328 | #endif |
| 1329 | 1329 | } |
| 1330 | 1330 | while( 1 ){ |
| 1331 | 1331 | while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; } |
| @@ -1349,11 +1349,11 @@ | ||
| 1349 | 1349 | */ |
| 1350 | 1350 | szFile = 0; |
| 1351 | 1351 | for(j=strlen(zBase)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1352 | 1352 | char c = zRepo[j]; |
| 1353 | 1353 | if( fossil_isalnum(c) ) continue; |
| 1354 | -#ifdef _WIN32 | |
| 1354 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 1355 | 1355 | /* Allow names to begin with "/X:/" on windows */ |
| 1356 | 1356 | if( c==':' && j==2 && sqlite3_strglob("/[a-zA-Z]:/*", zRepo)==0 ){ |
| 1357 | 1357 | continue; |
| 1358 | 1358 | } |
| 1359 | 1359 | #endif |
| 1360 | 1360 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1321,11 +1321,11 @@ | |
| 1321 | i64 szFile; /* File size of the candidate repository */ |
| 1322 | |
| 1323 | i = zPathInfo[0]!=0; |
| 1324 | if( fossil_strcmp(g.zRepositoryName, "/")==0 ){ |
| 1325 | zBase++; |
| 1326 | #ifdef _WIN32 |
| 1327 | if( sqlite3_strglob("/[a-zA-Z]:/*", zPathInfo)==0 ) i = 4; |
| 1328 | #endif |
| 1329 | } |
| 1330 | while( 1 ){ |
| 1331 | while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; } |
| @@ -1349,11 +1349,11 @@ | |
| 1349 | */ |
| 1350 | szFile = 0; |
| 1351 | for(j=strlen(zBase)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1352 | char c = zRepo[j]; |
| 1353 | if( fossil_isalnum(c) ) continue; |
| 1354 | #ifdef _WIN32 |
| 1355 | /* Allow names to begin with "/X:/" on windows */ |
| 1356 | if( c==':' && j==2 && sqlite3_strglob("/[a-zA-Z]:/*", zRepo)==0 ){ |
| 1357 | continue; |
| 1358 | } |
| 1359 | #endif |
| 1360 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1321,11 +1321,11 @@ | |
| 1321 | i64 szFile; /* File size of the candidate repository */ |
| 1322 | |
| 1323 | i = zPathInfo[0]!=0; |
| 1324 | if( fossil_strcmp(g.zRepositoryName, "/")==0 ){ |
| 1325 | zBase++; |
| 1326 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1327 | if( sqlite3_strglob("/[a-zA-Z]:/*", zPathInfo)==0 ) i = 4; |
| 1328 | #endif |
| 1329 | } |
| 1330 | while( 1 ){ |
| 1331 | while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; } |
| @@ -1349,11 +1349,11 @@ | |
| 1349 | */ |
| 1350 | szFile = 0; |
| 1351 | for(j=strlen(zBase)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1352 | char c = zRepo[j]; |
| 1353 | if( fossil_isalnum(c) ) continue; |
| 1354 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1355 | /* Allow names to begin with "/X:/" on windows */ |
| 1356 | if( c==':' && j==2 && sqlite3_strglob("/[a-zA-Z]:/*", zRepo)==0 ){ |
| 1357 | continue; |
| 1358 | } |
| 1359 | #endif |
| 1360 |