Fossil SCM
Fixed error with absolute pathnames when opening a repo on Win32
Commit
c841af0d501417c67cc1e8758ebbb85381c5e5d7
Parent
5a30fa45df78106…
2 files changed
+1
-1
+1
-1
+1
-1
| --- Makefile.w32 | ||
| +++ Makefile.w32 | ||
| @@ -25,11 +25,11 @@ | ||
| 25 | 25 | # for building intermediate code-generator tools. |
| 26 | 26 | # |
| 27 | 27 | #TCC = gcc -O6 |
| 28 | 28 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 29 | 29 | #TCC = gcc -g -Os -Wall |
| 30 | -TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 | |
| 30 | +TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include | |
| 31 | 31 | |
| 32 | 32 | #### Extra arguments for linking the finished binary. Fossil needs |
| 33 | 33 | # to link against the Z-Lib compression library. There are no |
| 34 | 34 | # other dependencies. We sometimes add the -static option here |
| 35 | 35 | # so that we can build a static executable that will run in a |
| 36 | 36 |
| --- Makefile.w32 | |
| +++ Makefile.w32 | |
| @@ -25,11 +25,11 @@ | |
| 25 | # for building intermediate code-generator tools. |
| 26 | # |
| 27 | #TCC = gcc -O6 |
| 28 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 29 | #TCC = gcc -g -Os -Wall |
| 30 | TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 |
| 31 | |
| 32 | #### Extra arguments for linking the finished binary. Fossil needs |
| 33 | # to link against the Z-Lib compression library. There are no |
| 34 | # other dependencies. We sometimes add the -static option here |
| 35 | # so that we can build a static executable that will run in a |
| 36 |
| --- Makefile.w32 | |
| +++ Makefile.w32 | |
| @@ -25,11 +25,11 @@ | |
| 25 | # for building intermediate code-generator tools. |
| 26 | # |
| 27 | #TCC = gcc -O6 |
| 28 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 29 | #TCC = gcc -g -Os -Wall |
| 30 | TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include |
| 31 | |
| 32 | #### Extra arguments for linking the finished binary. Fossil needs |
| 33 | # to link against the Z-Lib compression library. There are no |
| 34 | # other dependencies. We sometimes add the -static option here |
| 35 | # so that we can build a static executable that will run in a |
| 36 |
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -182,11 +182,11 @@ | ||
| 182 | 182 | ** Remove redundant / characters |
| 183 | 183 | ** Remove all /./ path elements. |
| 184 | 184 | ** Convert /A/../ to just / |
| 185 | 185 | */ |
| 186 | 186 | void file_canonical_name(const char *zOrigName, Blob *pOut){ |
| 187 | - if( zOrigName[0]=='/' ){ | |
| 187 | + if( zOrigName[0]=='/' || (zOrigName[1]==':' && zOrigName[2]=='\\') ){ | |
| 188 | 188 | blob_set(pOut, zOrigName); |
| 189 | 189 | blob_materialize(pOut); |
| 190 | 190 | }else{ |
| 191 | 191 | char zPwd[2000]; |
| 192 | 192 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 193 | 193 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -182,11 +182,11 @@ | |
| 182 | ** Remove redundant / characters |
| 183 | ** Remove all /./ path elements. |
| 184 | ** Convert /A/../ to just / |
| 185 | */ |
| 186 | void file_canonical_name(const char *zOrigName, Blob *pOut){ |
| 187 | if( zOrigName[0]=='/' ){ |
| 188 | blob_set(pOut, zOrigName); |
| 189 | blob_materialize(pOut); |
| 190 | }else{ |
| 191 | char zPwd[2000]; |
| 192 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 193 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -182,11 +182,11 @@ | |
| 182 | ** Remove redundant / characters |
| 183 | ** Remove all /./ path elements. |
| 184 | ** Convert /A/../ to just / |
| 185 | */ |
| 186 | void file_canonical_name(const char *zOrigName, Blob *pOut){ |
| 187 | if( zOrigName[0]=='/' || (zOrigName[1]==':' && zOrigName[2]=='\\') ){ |
| 188 | blob_set(pOut, zOrigName); |
| 189 | blob_materialize(pOut); |
| 190 | }else{ |
| 191 | char zPwd[2000]; |
| 192 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 193 |