Fossil SCM
Fix the --skin option so that it works on Windows.
Commit
685617773e63bc55902e9b06c5e068fc2a9585dce82a160a9df267468dd790cf
Parent
6fe0d689141df56…
2 files changed
+10
+5
+10
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -157,10 +157,20 @@ | ||
| 157 | 157 | fossil_free(z); |
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | return zOut; |
| 161 | 161 | } |
| 162 | + | |
| 163 | +/* | |
| 164 | +** Return the command-line option used to set the skin, or return NULL | |
| 165 | +** if the default skin is being used. | |
| 166 | +*/ | |
| 167 | +const char *skin_in_use(void){ | |
| 168 | + if( zAltSkinDir ) return zAltSkinDir; | |
| 169 | + if( pAltSkin ) return pAltSkin->zLabel; | |
| 170 | + return 0; | |
| 171 | +} | |
| 162 | 172 | |
| 163 | 173 | /* |
| 164 | 174 | ** Return a pointer to a SkinDetail element. Return 0 if not found. |
| 165 | 175 | */ |
| 166 | 176 | static struct SkinDetail *skin_detail_find(const char *zName){ |
| 167 | 177 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -157,10 +157,20 @@ | |
| 157 | fossil_free(z); |
| 158 | } |
| 159 | } |
| 160 | return zOut; |
| 161 | } |
| 162 | |
| 163 | /* |
| 164 | ** Return a pointer to a SkinDetail element. Return 0 if not found. |
| 165 | */ |
| 166 | static struct SkinDetail *skin_detail_find(const char *zName){ |
| 167 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -157,10 +157,20 @@ | |
| 157 | fossil_free(z); |
| 158 | } |
| 159 | } |
| 160 | return zOut; |
| 161 | } |
| 162 | |
| 163 | /* |
| 164 | ** Return the command-line option used to set the skin, or return NULL |
| 165 | ** if the default skin is being used. |
| 166 | */ |
| 167 | const char *skin_in_use(void){ |
| 168 | if( zAltSkinDir ) return zAltSkinDir; |
| 169 | if( pAltSkin ) return pAltSkin->zLabel; |
| 170 | return 0; |
| 171 | } |
| 172 | |
| 173 | /* |
| 174 | ** Return a pointer to a SkinDetail element. Return 0 if not found. |
| 175 | */ |
| 176 | static struct SkinDetail *skin_detail_find(const char *zName){ |
| 177 |
+5
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -306,10 +306,11 @@ | ||
| 306 | 306 | SOCKADDR_IN addr; |
| 307 | 307 | int idCnt = 0; |
| 308 | 308 | int iPort = mnPort; |
| 309 | 309 | Blob options; |
| 310 | 310 | wchar_t zTmpPath[MAX_PATH]; |
| 311 | + const char *zSkin; | |
| 311 | 312 | #if USE_SEE |
| 312 | 313 | const char *zSavedKey = 0; |
| 313 | 314 | size_t savedKeySize = 0; |
| 314 | 315 | #endif |
| 315 | 316 | |
| @@ -330,10 +331,14 @@ | ||
| 330 | 331 | blob_appendf(&options, " --th-trace"); |
| 331 | 332 | } |
| 332 | 333 | if( flags & HTTP_SERVER_REPOLIST ){ |
| 333 | 334 | blob_appendf(&options, " --repolist"); |
| 334 | 335 | } |
| 336 | + zSkin = skin_in_use(); | |
| 337 | + if( zSkin ){ | |
| 338 | + blob_appendf(&options, " --skin %s", zSkin); | |
| 339 | + } | |
| 335 | 340 | #if USE_SEE |
| 336 | 341 | zSavedKey = db_get_saved_encryption_key(); |
| 337 | 342 | savedKeySize = db_get_saved_encryption_key_size(); |
| 338 | 343 | if( zSavedKey!=0 && savedKeySize>0 ){ |
| 339 | 344 | blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(), |
| 340 | 345 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -306,10 +306,11 @@ | |
| 306 | SOCKADDR_IN addr; |
| 307 | int idCnt = 0; |
| 308 | int iPort = mnPort; |
| 309 | Blob options; |
| 310 | wchar_t zTmpPath[MAX_PATH]; |
| 311 | #if USE_SEE |
| 312 | const char *zSavedKey = 0; |
| 313 | size_t savedKeySize = 0; |
| 314 | #endif |
| 315 | |
| @@ -330,10 +331,14 @@ | |
| 330 | blob_appendf(&options, " --th-trace"); |
| 331 | } |
| 332 | if( flags & HTTP_SERVER_REPOLIST ){ |
| 333 | blob_appendf(&options, " --repolist"); |
| 334 | } |
| 335 | #if USE_SEE |
| 336 | zSavedKey = db_get_saved_encryption_key(); |
| 337 | savedKeySize = db_get_saved_encryption_key_size(); |
| 338 | if( zSavedKey!=0 && savedKeySize>0 ){ |
| 339 | blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(), |
| 340 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -306,10 +306,11 @@ | |
| 306 | SOCKADDR_IN addr; |
| 307 | int idCnt = 0; |
| 308 | int iPort = mnPort; |
| 309 | Blob options; |
| 310 | wchar_t zTmpPath[MAX_PATH]; |
| 311 | const char *zSkin; |
| 312 | #if USE_SEE |
| 313 | const char *zSavedKey = 0; |
| 314 | size_t savedKeySize = 0; |
| 315 | #endif |
| 316 | |
| @@ -330,10 +331,14 @@ | |
| 331 | blob_appendf(&options, " --th-trace"); |
| 332 | } |
| 333 | if( flags & HTTP_SERVER_REPOLIST ){ |
| 334 | blob_appendf(&options, " --repolist"); |
| 335 | } |
| 336 | zSkin = skin_in_use(); |
| 337 | if( zSkin ){ |
| 338 | blob_appendf(&options, " --skin %s", zSkin); |
| 339 | } |
| 340 | #if USE_SEE |
| 341 | zSavedKey = db_get_saved_encryption_key(); |
| 342 | savedKeySize = db_get_saved_encryption_key_size(); |
| 343 | if( zSavedKey!=0 && savedKeySize>0 ){ |
| 344 | blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(), |
| 345 |