Fossil SCM
Change calls to unlink() into file_delete(). The file_delete() routine converts filenames to MBCS from UTF if necessary.
Commit
eea64490987a16bb08ab88a45fee56edcd3a408a
Parent
f8f1c4e9a31ff7e…
16 files changed
+3
-3
+3
-3
+2
-2
+1
-1
+1
-1
+3
-3
+10
-1
+2
-2
+1
-1
+2
-2
+4
-4
+2
-2
+1
-1
+3
-3
+1
-1
+3
-3
+3
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -302,19 +302,19 @@ | ||
| 302 | 302 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 303 | 303 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 304 | 304 | } |
| 305 | 305 | while( db_step(&q)==SQLITE_ROW ){ |
| 306 | 306 | if( allFlag ){ |
| 307 | - unlink(db_column_text(&q, 0)); | |
| 307 | + file_delete(db_column_text(&q, 0)); | |
| 308 | 308 | }else{ |
| 309 | 309 | Blob ans; |
| 310 | 310 | char *prompt = mprintf("remove unmanaged file \"%s\" (y/N)? ", |
| 311 | 311 | db_column_text(&q, 0)); |
| 312 | 312 | blob_zero(&ans); |
| 313 | 313 | prompt_user(prompt, &ans); |
| 314 | 314 | if( blob_str(&ans)[0]=='y' ){ |
| 315 | - unlink(db_column_text(&q, 0)); | |
| 315 | + file_delete(db_column_text(&q, 0)); | |
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | db_finalize(&q); |
| 320 | 320 | } |
| @@ -410,11 +410,11 @@ | ||
| 410 | 410 | if( zIn[0]=='.' && (zIn[1]==0 || zIn[1]=='\r' || zIn[1]=='\n') ) break; |
| 411 | 411 | blob_append(&text, zIn, -1); |
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | blob_remove_cr(&text); |
| 415 | - unlink(zFile); | |
| 415 | + file_delete(zFile); | |
| 416 | 416 | free(zFile); |
| 417 | 417 | blob_zero(pComment); |
| 418 | 418 | while( blob_line(&text, &line) ){ |
| 419 | 419 | int i, n; |
| 420 | 420 | char *z; |
| 421 | 421 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -302,19 +302,19 @@ | |
| 302 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 303 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 304 | } |
| 305 | while( db_step(&q)==SQLITE_ROW ){ |
| 306 | if( allFlag ){ |
| 307 | unlink(db_column_text(&q, 0)); |
| 308 | }else{ |
| 309 | Blob ans; |
| 310 | char *prompt = mprintf("remove unmanaged file \"%s\" (y/N)? ", |
| 311 | db_column_text(&q, 0)); |
| 312 | blob_zero(&ans); |
| 313 | prompt_user(prompt, &ans); |
| 314 | if( blob_str(&ans)[0]=='y' ){ |
| 315 | unlink(db_column_text(&q, 0)); |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | db_finalize(&q); |
| 320 | } |
| @@ -410,11 +410,11 @@ | |
| 410 | if( zIn[0]=='.' && (zIn[1]==0 || zIn[1]=='\r' || zIn[1]=='\n') ) break; |
| 411 | blob_append(&text, zIn, -1); |
| 412 | } |
| 413 | } |
| 414 | blob_remove_cr(&text); |
| 415 | unlink(zFile); |
| 416 | free(zFile); |
| 417 | blob_zero(pComment); |
| 418 | while( blob_line(&text, &line) ){ |
| 419 | int i, n; |
| 420 | char *z; |
| 421 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -302,19 +302,19 @@ | |
| 302 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 303 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 304 | } |
| 305 | while( db_step(&q)==SQLITE_ROW ){ |
| 306 | if( allFlag ){ |
| 307 | file_delete(db_column_text(&q, 0)); |
| 308 | }else{ |
| 309 | Blob ans; |
| 310 | char *prompt = mprintf("remove unmanaged file \"%s\" (y/N)? ", |
| 311 | db_column_text(&q, 0)); |
| 312 | blob_zero(&ans); |
| 313 | prompt_user(prompt, &ans); |
| 314 | if( blob_str(&ans)[0]=='y' ){ |
| 315 | file_delete(db_column_text(&q, 0)); |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | db_finalize(&q); |
| 320 | } |
| @@ -410,11 +410,11 @@ | |
| 410 | if( zIn[0]=='.' && (zIn[1]==0 || zIn[1]=='\r' || zIn[1]=='\n') ) break; |
| 411 | blob_append(&text, zIn, -1); |
| 412 | } |
| 413 | } |
| 414 | blob_remove_cr(&text); |
| 415 | file_delete(zFile); |
| 416 | free(zFile); |
| 417 | blob_zero(pComment); |
| 418 | while( blob_line(&text, &line) ){ |
| 419 | int i, n; |
| 420 | char *z; |
| 421 |
+3
-3
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -157,16 +157,16 @@ | ||
| 157 | 157 | free(zManFile); |
| 158 | 158 | blob_reset(&hash); |
| 159 | 159 | }else{ |
| 160 | 160 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest'") ){ |
| 161 | 161 | zManFile = mprintf("%smanifest", g.zLocalRoot); |
| 162 | - unlink(zManFile); | |
| 162 | + file_delete(zManFile); | |
| 163 | 163 | free(zManFile); |
| 164 | 164 | } |
| 165 | 165 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest.uuid'") ){ |
| 166 | 166 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 167 | - unlink(zManFile); | |
| 167 | + file_delete(zManFile); | |
| 168 | 168 | free(zManFile); |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | } |
| @@ -268,11 +268,11 @@ | ||
| 268 | 268 | int i; |
| 269 | 269 | for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ |
| 270 | 270 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 271 | 271 | char *z; |
| 272 | 272 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 273 | - unlink(z); | |
| 273 | + file_delete(z); | |
| 274 | 274 | free(z); |
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -157,16 +157,16 @@ | |
| 157 | free(zManFile); |
| 158 | blob_reset(&hash); |
| 159 | }else{ |
| 160 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest'") ){ |
| 161 | zManFile = mprintf("%smanifest", g.zLocalRoot); |
| 162 | unlink(zManFile); |
| 163 | free(zManFile); |
| 164 | } |
| 165 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest.uuid'") ){ |
| 166 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 167 | unlink(zManFile); |
| 168 | free(zManFile); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | } |
| @@ -268,11 +268,11 @@ | |
| 268 | int i; |
| 269 | for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ |
| 270 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 271 | char *z; |
| 272 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 273 | unlink(z); |
| 274 | free(z); |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | |
| 279 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -157,16 +157,16 @@ | |
| 157 | free(zManFile); |
| 158 | blob_reset(&hash); |
| 159 | }else{ |
| 160 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest'") ){ |
| 161 | zManFile = mprintf("%smanifest", g.zLocalRoot); |
| 162 | file_delete(zManFile); |
| 163 | free(zManFile); |
| 164 | } |
| 165 | if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest.uuid'") ){ |
| 166 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 167 | file_delete(zManFile); |
| 168 | free(zManFile); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | } |
| @@ -268,11 +268,11 @@ | |
| 268 | int i; |
| 269 | for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ |
| 270 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 271 | char *z; |
| 272 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 273 | file_delete(z); |
| 274 | free(z); |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | |
| 279 |
+2
-2
| --- src/clearsign.c | ||
| +++ src/clearsign.c | ||
| @@ -52,11 +52,11 @@ | ||
| 52 | 52 | }else{ |
| 53 | 53 | if( pOut!=pIn ){ |
| 54 | 54 | blob_copy(pOut, pIn); |
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | - unlink(zOut); | |
| 58 | - unlink(zIn); | |
| 57 | + file_delete(zOut); | |
| 58 | + file_delete(zIn); | |
| 59 | 59 | free(zOut); |
| 60 | 60 | free(zIn); |
| 61 | 61 | return rc; |
| 62 | 62 | } |
| 63 | 63 |
| --- src/clearsign.c | |
| +++ src/clearsign.c | |
| @@ -52,11 +52,11 @@ | |
| 52 | }else{ |
| 53 | if( pOut!=pIn ){ |
| 54 | blob_copy(pOut, pIn); |
| 55 | } |
| 56 | } |
| 57 | unlink(zOut); |
| 58 | unlink(zIn); |
| 59 | free(zOut); |
| 60 | free(zIn); |
| 61 | return rc; |
| 62 | } |
| 63 |
| --- src/clearsign.c | |
| +++ src/clearsign.c | |
| @@ -52,11 +52,11 @@ | |
| 52 | }else{ |
| 53 | if( pOut!=pIn ){ |
| 54 | blob_copy(pOut, pIn); |
| 55 | } |
| 56 | } |
| 57 | file_delete(zOut); |
| 58 | file_delete(zIn); |
| 59 | free(zOut); |
| 60 | free(zIn); |
| 61 | return rc; |
| 62 | } |
| 63 |
+1
-1
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -104,11 +104,11 @@ | ||
| 104 | 104 | g.xlinkClusterOnly = 0; |
| 105 | 105 | verify_cancel(); |
| 106 | 106 | db_end_transaction(0); |
| 107 | 107 | db_close(1); |
| 108 | 108 | if( nErr ){ |
| 109 | - unlink(g.argv[3]); | |
| 109 | + file_delete(g.argv[3]); | |
| 110 | 110 | fossil_fatal("server returned an error - clone aborted"); |
| 111 | 111 | } |
| 112 | 112 | db_open_repository(g.argv[3]); |
| 113 | 113 | } |
| 114 | 114 | db_begin_transaction(); |
| 115 | 115 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -104,11 +104,11 @@ | |
| 104 | g.xlinkClusterOnly = 0; |
| 105 | verify_cancel(); |
| 106 | db_end_transaction(0); |
| 107 | db_close(1); |
| 108 | if( nErr ){ |
| 109 | unlink(g.argv[3]); |
| 110 | fossil_fatal("server returned an error - clone aborted"); |
| 111 | } |
| 112 | db_open_repository(g.argv[3]); |
| 113 | } |
| 114 | db_begin_transaction(); |
| 115 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -104,11 +104,11 @@ | |
| 104 | g.xlinkClusterOnly = 0; |
| 105 | verify_cancel(); |
| 106 | db_end_transaction(0); |
| 107 | db_close(1); |
| 108 | if( nErr ){ |
| 109 | file_delete(g.argv[3]); |
| 110 | fossil_fatal("server returned an error - clone aborted"); |
| 111 | } |
| 112 | db_open_repository(g.argv[3]); |
| 113 | } |
| 114 | db_begin_transaction(); |
| 115 |
M
src/db.c
+1
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -153,11 +153,11 @@ | ||
| 153 | 153 | if( nBegin ){ |
| 154 | 154 | sqlite3_exec(g.db, "ROLLBACK", 0, 0, 0); |
| 155 | 155 | nBegin = 0; |
| 156 | 156 | if( isNewRepo ){ |
| 157 | 157 | db_close(0); |
| 158 | - unlink(g.zRepositoryName); | |
| 158 | + file_delete(g.zRepositoryName); | |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | busy = 0; |
| 162 | 162 | db_close(0); |
| 163 | 163 | } |
| 164 | 164 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -153,11 +153,11 @@ | |
| 153 | if( nBegin ){ |
| 154 | sqlite3_exec(g.db, "ROLLBACK", 0, 0, 0); |
| 155 | nBegin = 0; |
| 156 | if( isNewRepo ){ |
| 157 | db_close(0); |
| 158 | unlink(g.zRepositoryName); |
| 159 | } |
| 160 | } |
| 161 | busy = 0; |
| 162 | db_close(0); |
| 163 | } |
| 164 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -153,11 +153,11 @@ | |
| 153 | if( nBegin ){ |
| 154 | sqlite3_exec(g.db, "ROLLBACK", 0, 0, 0); |
| 155 | nBegin = 0; |
| 156 | if( isNewRepo ){ |
| 157 | db_close(0); |
| 158 | file_delete(g.zRepositoryName); |
| 159 | } |
| 160 | } |
| 161 | busy = 0; |
| 162 | db_close(0); |
| 163 | } |
| 164 |
+3
-3
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -114,11 +114,11 @@ | ||
| 114 | 114 | |
| 115 | 115 | /* Run the external diff command */ |
| 116 | 116 | fossil_system(blob_str(&cmd)); |
| 117 | 117 | |
| 118 | 118 | /* Delete the temporary file and clean up memory used */ |
| 119 | - unlink(blob_str(&nameFile1)); | |
| 119 | + file_delete(blob_str(&nameFile1)); | |
| 120 | 120 | blob_reset(&nameFile1); |
| 121 | 121 | blob_reset(&cmd); |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| @@ -168,12 +168,12 @@ | ||
| 168 | 168 | |
| 169 | 169 | /* Run the external diff command */ |
| 170 | 170 | fossil_system(blob_str(&cmd)); |
| 171 | 171 | |
| 172 | 172 | /* Delete the temporary file and clean up memory used */ |
| 173 | - unlink(zTemp1); | |
| 174 | - unlink(zTemp2); | |
| 173 | + file_delete(zTemp1); | |
| 174 | + file_delete(zTemp2); | |
| 175 | 175 | blob_reset(&cmd); |
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /* |
| 180 | 180 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -114,11 +114,11 @@ | |
| 114 | |
| 115 | /* Run the external diff command */ |
| 116 | fossil_system(blob_str(&cmd)); |
| 117 | |
| 118 | /* Delete the temporary file and clean up memory used */ |
| 119 | unlink(blob_str(&nameFile1)); |
| 120 | blob_reset(&nameFile1); |
| 121 | blob_reset(&cmd); |
| 122 | } |
| 123 | } |
| 124 | |
| @@ -168,12 +168,12 @@ | |
| 168 | |
| 169 | /* Run the external diff command */ |
| 170 | fossil_system(blob_str(&cmd)); |
| 171 | |
| 172 | /* Delete the temporary file and clean up memory used */ |
| 173 | unlink(zTemp1); |
| 174 | unlink(zTemp2); |
| 175 | blob_reset(&cmd); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /* |
| 180 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -114,11 +114,11 @@ | |
| 114 | |
| 115 | /* Run the external diff command */ |
| 116 | fossil_system(blob_str(&cmd)); |
| 117 | |
| 118 | /* Delete the temporary file and clean up memory used */ |
| 119 | file_delete(blob_str(&nameFile1)); |
| 120 | blob_reset(&nameFile1); |
| 121 | blob_reset(&cmd); |
| 122 | } |
| 123 | } |
| 124 | |
| @@ -168,12 +168,12 @@ | |
| 168 | |
| 169 | /* Run the external diff command */ |
| 170 | fossil_system(blob_str(&cmd)); |
| 171 | |
| 172 | /* Delete the temporary file and clean up memory used */ |
| 173 | file_delete(zTemp1); |
| 174 | file_delete(zTemp2); |
| 175 | blob_reset(&cmd); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /* |
| 180 |
+10
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -200,10 +200,19 @@ | ||
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | #endif /* _WIN32 */ |
| 203 | 203 | return rc; |
| 204 | 204 | } |
| 205 | + | |
| 206 | +/* | |
| 207 | +** Delete a file. | |
| 208 | +*/ | |
| 209 | +void file_delete(const char *zFilename){ | |
| 210 | + char *z = fossil_utf8_to_mbcs(zFilename); | |
| 211 | + unlink(z); | |
| 212 | + fossil_mbcs_free(z); | |
| 213 | +} | |
| 205 | 214 | |
| 206 | 215 | /* |
| 207 | 216 | ** Create the directory named in the argument, if it does not already |
| 208 | 217 | ** exist. If forceFlag is 1, delete any prior non-directory object |
| 209 | 218 | ** with the same name. |
| @@ -212,11 +221,11 @@ | ||
| 212 | 221 | */ |
| 213 | 222 | int file_mkdir(const char *zName, int forceFlag){ |
| 214 | 223 | int rc = file_isdir(zName); |
| 215 | 224 | if( rc==2 ){ |
| 216 | 225 | if( !forceFlag ) return 1; |
| 217 | - unlink(zName); | |
| 226 | + file_delete(zName); | |
| 218 | 227 | } |
| 219 | 228 | if( rc!=1 ){ |
| 220 | 229 | #if defined(_WIN32) |
| 221 | 230 | return mkdir(zName); |
| 222 | 231 | #else |
| 223 | 232 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -200,10 +200,19 @@ | |
| 200 | } |
| 201 | } |
| 202 | #endif /* _WIN32 */ |
| 203 | return rc; |
| 204 | } |
| 205 | |
| 206 | /* |
| 207 | ** Create the directory named in the argument, if it does not already |
| 208 | ** exist. If forceFlag is 1, delete any prior non-directory object |
| 209 | ** with the same name. |
| @@ -212,11 +221,11 @@ | |
| 212 | */ |
| 213 | int file_mkdir(const char *zName, int forceFlag){ |
| 214 | int rc = file_isdir(zName); |
| 215 | if( rc==2 ){ |
| 216 | if( !forceFlag ) return 1; |
| 217 | unlink(zName); |
| 218 | } |
| 219 | if( rc!=1 ){ |
| 220 | #if defined(_WIN32) |
| 221 | return mkdir(zName); |
| 222 | #else |
| 223 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -200,10 +200,19 @@ | |
| 200 | } |
| 201 | } |
| 202 | #endif /* _WIN32 */ |
| 203 | return rc; |
| 204 | } |
| 205 | |
| 206 | /* |
| 207 | ** Delete a file. |
| 208 | */ |
| 209 | void file_delete(const char *zFilename){ |
| 210 | char *z = fossil_utf8_to_mbcs(zFilename); |
| 211 | unlink(z); |
| 212 | fossil_mbcs_free(z); |
| 213 | } |
| 214 | |
| 215 | /* |
| 216 | ** Create the directory named in the argument, if it does not already |
| 217 | ** exist. If forceFlag is 1, delete any prior non-directory object |
| 218 | ** with the same name. |
| @@ -212,11 +221,11 @@ | |
| 221 | */ |
| 222 | int file_mkdir(const char *zName, int forceFlag){ |
| 223 | int rc = file_isdir(zName); |
| 224 | if( rc==2 ){ |
| 225 | if( !forceFlag ) return 1; |
| 226 | file_delete(zName); |
| 227 | } |
| 228 | if( rc!=1 ){ |
| 229 | #if defined(_WIN32) |
| 230 | return mkdir(zName); |
| 231 | #else |
| 232 |
+2
-2
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -246,12 +246,12 @@ | ||
| 246 | 246 | }else if( g.urlIsFile ){ |
| 247 | 247 | if( transport.pFile ){ |
| 248 | 248 | fclose(transport.pFile); |
| 249 | 249 | transport.pFile = 0; |
| 250 | 250 | } |
| 251 | - unlink(transport.zInFile); | |
| 252 | - unlink(transport.zOutFile); | |
| 251 | + file_delete(transport.zInFile); | |
| 252 | + file_delete(transport.zOutFile); | |
| 253 | 253 | free(transport.zInFile); |
| 254 | 254 | free(transport.zOutFile); |
| 255 | 255 | }else{ |
| 256 | 256 | socket_close(); |
| 257 | 257 | } |
| 258 | 258 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -246,12 +246,12 @@ | |
| 246 | }else if( g.urlIsFile ){ |
| 247 | if( transport.pFile ){ |
| 248 | fclose(transport.pFile); |
| 249 | transport.pFile = 0; |
| 250 | } |
| 251 | unlink(transport.zInFile); |
| 252 | unlink(transport.zOutFile); |
| 253 | free(transport.zInFile); |
| 254 | free(transport.zOutFile); |
| 255 | }else{ |
| 256 | socket_close(); |
| 257 | } |
| 258 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -246,12 +246,12 @@ | |
| 246 | }else if( g.urlIsFile ){ |
| 247 | if( transport.pFile ){ |
| 248 | fclose(transport.pFile); |
| 249 | transport.pFile = 0; |
| 250 | } |
| 251 | file_delete(transport.zInFile); |
| 252 | file_delete(transport.zOutFile); |
| 253 | free(transport.zInFile); |
| 254 | free(transport.zOutFile); |
| 255 | }else{ |
| 256 | socket_close(); |
| 257 | } |
| 258 |
+1
-1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -697,11 +697,11 @@ | ||
| 697 | 697 | }else{ |
| 698 | 698 | pIn = stdin; |
| 699 | 699 | fossil_binary_mode(pIn); |
| 700 | 700 | } |
| 701 | 701 | if( !incrFlag ){ |
| 702 | - if( forceFlag ) unlink(g.argv[2]); | |
| 702 | + if( forceFlag ) file_delete(g.argv[2]); | |
| 703 | 703 | db_create_repository(g.argv[2]); |
| 704 | 704 | } |
| 705 | 705 | db_open_repository(g.argv[2]); |
| 706 | 706 | db_open_config(0); |
| 707 | 707 | |
| 708 | 708 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -697,11 +697,11 @@ | |
| 697 | }else{ |
| 698 | pIn = stdin; |
| 699 | fossil_binary_mode(pIn); |
| 700 | } |
| 701 | if( !incrFlag ){ |
| 702 | if( forceFlag ) unlink(g.argv[2]); |
| 703 | db_create_repository(g.argv[2]); |
| 704 | } |
| 705 | db_open_repository(g.argv[2]); |
| 706 | db_open_config(0); |
| 707 | |
| 708 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -697,11 +697,11 @@ | |
| 697 | }else{ |
| 698 | pIn = stdin; |
| 699 | fossil_binary_mode(pIn); |
| 700 | } |
| 701 | if( !incrFlag ){ |
| 702 | if( forceFlag ) file_delete(g.argv[2]); |
| 703 | db_create_repository(g.argv[2]); |
| 704 | } |
| 705 | db_open_repository(g.argv[2]); |
| 706 | db_open_config(0); |
| 707 | |
| 708 |
+2
-2
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -415,11 +415,11 @@ | ||
| 415 | 415 | db_multi_exec( |
| 416 | 416 | "UPDATE vfile SET deleted=1 WHERE id=%d", idv |
| 417 | 417 | ); |
| 418 | 418 | if( !nochangeFlag ){ |
| 419 | 419 | char *zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 420 | - unlink(zFullPath); | |
| 420 | + file_delete(zFullPath); | |
| 421 | 421 | free(zFullPath); |
| 422 | 422 | } |
| 423 | 423 | } |
| 424 | 424 | db_finalize(&q); |
| 425 | 425 | |
| @@ -445,11 +445,11 @@ | ||
| 445 | 445 | ); |
| 446 | 446 | if( !nochangeFlag ){ |
| 447 | 447 | char *zFullOldPath = mprintf("%s%s", g.zLocalRoot, zOldName); |
| 448 | 448 | char *zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 449 | 449 | file_copy(zFullOldPath, zFullNewPath); |
| 450 | - unlink(zFullOldPath); | |
| 450 | + file_delete(zFullOldPath); | |
| 451 | 451 | free(zFullNewPath); |
| 452 | 452 | free(zFullOldPath); |
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | db_finalize(&q); |
| 456 | 456 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -415,11 +415,11 @@ | |
| 415 | db_multi_exec( |
| 416 | "UPDATE vfile SET deleted=1 WHERE id=%d", idv |
| 417 | ); |
| 418 | if( !nochangeFlag ){ |
| 419 | char *zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 420 | unlink(zFullPath); |
| 421 | free(zFullPath); |
| 422 | } |
| 423 | } |
| 424 | db_finalize(&q); |
| 425 | |
| @@ -445,11 +445,11 @@ | |
| 445 | ); |
| 446 | if( !nochangeFlag ){ |
| 447 | char *zFullOldPath = mprintf("%s%s", g.zLocalRoot, zOldName); |
| 448 | char *zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 449 | file_copy(zFullOldPath, zFullNewPath); |
| 450 | unlink(zFullOldPath); |
| 451 | free(zFullNewPath); |
| 452 | free(zFullOldPath); |
| 453 | } |
| 454 | } |
| 455 | db_finalize(&q); |
| 456 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -415,11 +415,11 @@ | |
| 415 | db_multi_exec( |
| 416 | "UPDATE vfile SET deleted=1 WHERE id=%d", idv |
| 417 | ); |
| 418 | if( !nochangeFlag ){ |
| 419 | char *zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 420 | file_delete(zFullPath); |
| 421 | free(zFullPath); |
| 422 | } |
| 423 | } |
| 424 | db_finalize(&q); |
| 425 | |
| @@ -445,11 +445,11 @@ | |
| 445 | ); |
| 446 | if( !nochangeFlag ){ |
| 447 | char *zFullOldPath = mprintf("%s%s", g.zLocalRoot, zOldName); |
| 448 | char *zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 449 | file_copy(zFullOldPath, zFullNewPath); |
| 450 | file_delete(zFullOldPath); |
| 451 | free(zFullNewPath); |
| 452 | free(zFullOldPath); |
| 453 | } |
| 454 | } |
| 455 | db_finalize(&q); |
| 456 |
+4
-4
| --- src/merge3.c | ||
| +++ src/merge3.c | ||
| @@ -424,14 +424,14 @@ | ||
| 424 | 424 | zCmd = string_subst(zGMerge, 8, azSubst); |
| 425 | 425 | printf("%s\n", zCmd); fflush(stdout); |
| 426 | 426 | fossil_system(zCmd); |
| 427 | 427 | if( file_size(zOut)>=0 ){ |
| 428 | 428 | blob_read_from_file(pOut, zOut); |
| 429 | - unlink(zPivot); | |
| 430 | - unlink(zOrig); | |
| 431 | - unlink(zOther); | |
| 432 | - unlink(zOut); | |
| 429 | + file_delete(zPivot); | |
| 430 | + file_delete(zOrig); | |
| 431 | + file_delete(zOther); | |
| 432 | + file_delete(zOut); | |
| 433 | 433 | } |
| 434 | 434 | fossil_free(zCmd); |
| 435 | 435 | fossil_free(zOut); |
| 436 | 436 | } |
| 437 | 437 | fossil_free(zPivot); |
| 438 | 438 |
| --- src/merge3.c | |
| +++ src/merge3.c | |
| @@ -424,14 +424,14 @@ | |
| 424 | zCmd = string_subst(zGMerge, 8, azSubst); |
| 425 | printf("%s\n", zCmd); fflush(stdout); |
| 426 | fossil_system(zCmd); |
| 427 | if( file_size(zOut)>=0 ){ |
| 428 | blob_read_from_file(pOut, zOut); |
| 429 | unlink(zPivot); |
| 430 | unlink(zOrig); |
| 431 | unlink(zOther); |
| 432 | unlink(zOut); |
| 433 | } |
| 434 | fossil_free(zCmd); |
| 435 | fossil_free(zOut); |
| 436 | } |
| 437 | fossil_free(zPivot); |
| 438 |
| --- src/merge3.c | |
| +++ src/merge3.c | |
| @@ -424,14 +424,14 @@ | |
| 424 | zCmd = string_subst(zGMerge, 8, azSubst); |
| 425 | printf("%s\n", zCmd); fflush(stdout); |
| 426 | fossil_system(zCmd); |
| 427 | if( file_size(zOut)>=0 ){ |
| 428 | blob_read_from_file(pOut, zOut); |
| 429 | file_delete(zPivot); |
| 430 | file_delete(zOrig); |
| 431 | file_delete(zOther); |
| 432 | file_delete(zOut); |
| 433 | } |
| 434 | fossil_free(zCmd); |
| 435 | fossil_free(zOut); |
| 436 | } |
| 437 | fossil_free(zPivot); |
| 438 |
+2
-2
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -188,11 +188,11 @@ | ||
| 188 | 188 | blob_write_to_file(&delta, zNPath); |
| 189 | 189 | file_setexe(zNPath, isExec); |
| 190 | 190 | fossil_print("ADD %s\n", zNew); |
| 191 | 191 | }else if( isRemoved ){ |
| 192 | 192 | fossil_print("DELETE %s\n", zOrig); |
| 193 | - unlink(zOPath); | |
| 193 | + file_delete(zOPath); | |
| 194 | 194 | }else{ |
| 195 | 195 | Blob a, b, out, disk; |
| 196 | 196 | db_ephemeral_blob(&q, 5, &delta); |
| 197 | 197 | blob_read_from_file(&disk, zOPath); |
| 198 | 198 | content_get(rid, &a); |
| @@ -218,11 +218,11 @@ | ||
| 218 | 218 | blob_reset(&disk); |
| 219 | 219 | } |
| 220 | 220 | blob_reset(&delta); |
| 221 | 221 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 222 | 222 | undo_save(zOrig); |
| 223 | - unlink(zOPath); | |
| 223 | + file_delete(zOPath); | |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | db_finalize(&q); |
| 227 | 227 | if( nConflict ){ |
| 228 | 228 | fossil_print("WARNING: merge conflicts - see messages above for details.\n"); |
| 229 | 229 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -188,11 +188,11 @@ | |
| 188 | blob_write_to_file(&delta, zNPath); |
| 189 | file_setexe(zNPath, isExec); |
| 190 | fossil_print("ADD %s\n", zNew); |
| 191 | }else if( isRemoved ){ |
| 192 | fossil_print("DELETE %s\n", zOrig); |
| 193 | unlink(zOPath); |
| 194 | }else{ |
| 195 | Blob a, b, out, disk; |
| 196 | db_ephemeral_blob(&q, 5, &delta); |
| 197 | blob_read_from_file(&disk, zOPath); |
| 198 | content_get(rid, &a); |
| @@ -218,11 +218,11 @@ | |
| 218 | blob_reset(&disk); |
| 219 | } |
| 220 | blob_reset(&delta); |
| 221 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 222 | undo_save(zOrig); |
| 223 | unlink(zOPath); |
| 224 | } |
| 225 | } |
| 226 | db_finalize(&q); |
| 227 | if( nConflict ){ |
| 228 | fossil_print("WARNING: merge conflicts - see messages above for details.\n"); |
| 229 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -188,11 +188,11 @@ | |
| 188 | blob_write_to_file(&delta, zNPath); |
| 189 | file_setexe(zNPath, isExec); |
| 190 | fossil_print("ADD %s\n", zNew); |
| 191 | }else if( isRemoved ){ |
| 192 | fossil_print("DELETE %s\n", zOrig); |
| 193 | file_delete(zOPath); |
| 194 | }else{ |
| 195 | Blob a, b, out, disk; |
| 196 | db_ephemeral_blob(&q, 5, &delta); |
| 197 | blob_read_from_file(&disk, zOPath); |
| 198 | content_get(rid, &a); |
| @@ -218,11 +218,11 @@ | |
| 218 | blob_reset(&disk); |
| 219 | } |
| 220 | blob_reset(&delta); |
| 221 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 222 | undo_save(zOrig); |
| 223 | file_delete(zOPath); |
| 224 | } |
| 225 | } |
| 226 | db_finalize(&q); |
| 227 | if( nConflict ){ |
| 228 | fossil_print("WARNING: merge conflicts - see messages above for details.\n"); |
| 229 |
+1
-1
| --- src/undo.c | ||
| +++ src/undo.c | ||
| @@ -66,11 +66,11 @@ | ||
| 66 | 66 | } |
| 67 | 67 | blob_write_to_file(&new, zFullname); |
| 68 | 68 | file_setexe(zFullname, old_exe); |
| 69 | 69 | }else{ |
| 70 | 70 | fossil_print("DELETE %s\n", zPathname); |
| 71 | - unlink(zFullname); | |
| 71 | + file_delete(zFullname); | |
| 72 | 72 | } |
| 73 | 73 | blob_reset(&new); |
| 74 | 74 | free(zFullname); |
| 75 | 75 | db_finalize(&q); |
| 76 | 76 | db_prepare(&q, |
| 77 | 77 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | } |
| 67 | blob_write_to_file(&new, zFullname); |
| 68 | file_setexe(zFullname, old_exe); |
| 69 | }else{ |
| 70 | fossil_print("DELETE %s\n", zPathname); |
| 71 | unlink(zFullname); |
| 72 | } |
| 73 | blob_reset(&new); |
| 74 | free(zFullname); |
| 75 | db_finalize(&q); |
| 76 | db_prepare(&q, |
| 77 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | } |
| 67 | blob_write_to_file(&new, zFullname); |
| 68 | file_setexe(zFullname, old_exe); |
| 69 | }else{ |
| 70 | fossil_print("DELETE %s\n", zPathname); |
| 71 | file_delete(zFullname); |
| 72 | } |
| 73 | blob_reset(&new); |
| 74 | free(zFullname); |
| 75 | db_finalize(&q); |
| 76 | db_prepare(&q, |
| 77 |
+3
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -363,11 +363,11 @@ | ||
| 363 | 363 | zName); |
| 364 | 364 | nConflict++; |
| 365 | 365 | }else{ |
| 366 | 366 | fossil_print("REMOVE %s\n", zName); |
| 367 | 367 | undo_save(zName); |
| 368 | - if( !nochangeFlag ) unlink(zFullPath); | |
| 368 | + if( !nochangeFlag ) file_delete(zFullPath); | |
| 369 | 369 | } |
| 370 | 370 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged ){ |
| 371 | 371 | /* Merge the changes in the current tree into the target version */ |
| 372 | 372 | Blob r, t, v; |
| 373 | 373 | int rc; |
| @@ -395,11 +395,11 @@ | ||
| 395 | 395 | file_setexe(zFullNewPath, isexe); |
| 396 | 396 | } |
| 397 | 397 | fossil_print("***** Cannot merge binary file %s\n", zNewName); |
| 398 | 398 | nConflict++; |
| 399 | 399 | } |
| 400 | - if( nameChng && !nochangeFlag ) unlink(zFullPath); | |
| 400 | + if( nameChng && !nochangeFlag ) file_delete(zFullPath); | |
| 401 | 401 | blob_reset(&v); |
| 402 | 402 | blob_reset(&t); |
| 403 | 403 | blob_reset(&r); |
| 404 | 404 | }else{ |
| 405 | 405 | if( chnged ){ |
| @@ -574,11 +574,11 @@ | ||
| 574 | 574 | if( errCode==2 ){ |
| 575 | 575 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFile)==0 ){ |
| 576 | 576 | fossil_print("UNMANAGE: %s\n", zFile); |
| 577 | 577 | }else{ |
| 578 | 578 | undo_save(zFile); |
| 579 | - unlink(zFull); | |
| 579 | + file_delete(zFull); | |
| 580 | 580 | fossil_print("DELETE: %s\n", zFile); |
| 581 | 581 | } |
| 582 | 582 | db_multi_exec("DELETE FROM vfile WHERE pathname=%Q", zFile); |
| 583 | 583 | }else{ |
| 584 | 584 | sqlite3_int64 mtime; |
| 585 | 585 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -363,11 +363,11 @@ | |
| 363 | zName); |
| 364 | nConflict++; |
| 365 | }else{ |
| 366 | fossil_print("REMOVE %s\n", zName); |
| 367 | undo_save(zName); |
| 368 | if( !nochangeFlag ) unlink(zFullPath); |
| 369 | } |
| 370 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged ){ |
| 371 | /* Merge the changes in the current tree into the target version */ |
| 372 | Blob r, t, v; |
| 373 | int rc; |
| @@ -395,11 +395,11 @@ | |
| 395 | file_setexe(zFullNewPath, isexe); |
| 396 | } |
| 397 | fossil_print("***** Cannot merge binary file %s\n", zNewName); |
| 398 | nConflict++; |
| 399 | } |
| 400 | if( nameChng && !nochangeFlag ) unlink(zFullPath); |
| 401 | blob_reset(&v); |
| 402 | blob_reset(&t); |
| 403 | blob_reset(&r); |
| 404 | }else{ |
| 405 | if( chnged ){ |
| @@ -574,11 +574,11 @@ | |
| 574 | if( errCode==2 ){ |
| 575 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFile)==0 ){ |
| 576 | fossil_print("UNMANAGE: %s\n", zFile); |
| 577 | }else{ |
| 578 | undo_save(zFile); |
| 579 | unlink(zFull); |
| 580 | fossil_print("DELETE: %s\n", zFile); |
| 581 | } |
| 582 | db_multi_exec("DELETE FROM vfile WHERE pathname=%Q", zFile); |
| 583 | }else{ |
| 584 | sqlite3_int64 mtime; |
| 585 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -363,11 +363,11 @@ | |
| 363 | zName); |
| 364 | nConflict++; |
| 365 | }else{ |
| 366 | fossil_print("REMOVE %s\n", zName); |
| 367 | undo_save(zName); |
| 368 | if( !nochangeFlag ) file_delete(zFullPath); |
| 369 | } |
| 370 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged ){ |
| 371 | /* Merge the changes in the current tree into the target version */ |
| 372 | Blob r, t, v; |
| 373 | int rc; |
| @@ -395,11 +395,11 @@ | |
| 395 | file_setexe(zFullNewPath, isexe); |
| 396 | } |
| 397 | fossil_print("***** Cannot merge binary file %s\n", zNewName); |
| 398 | nConflict++; |
| 399 | } |
| 400 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 401 | blob_reset(&v); |
| 402 | blob_reset(&t); |
| 403 | blob_reset(&r); |
| 404 | }else{ |
| 405 | if( chnged ){ |
| @@ -574,11 +574,11 @@ | |
| 574 | if( errCode==2 ){ |
| 575 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFile)==0 ){ |
| 576 | fossil_print("UNMANAGE: %s\n", zFile); |
| 577 | }else{ |
| 578 | undo_save(zFile); |
| 579 | file_delete(zFull); |
| 580 | fossil_print("DELETE: %s\n", zFile); |
| 581 | } |
| 582 | db_multi_exec("DELETE FROM vfile WHERE pathname=%Q", zFile); |
| 583 | }else{ |
| 584 | sqlite3_int64 mtime; |
| 585 |
+1
-1
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -286,11 +286,11 @@ | ||
| 286 | 286 | " WHERE vid=%d AND mrid>0", g.zLocalRoot, vid); |
| 287 | 287 | while( db_step(&q)==SQLITE_ROW ){ |
| 288 | 288 | const char *zName; |
| 289 | 289 | |
| 290 | 290 | zName = db_column_text(&q, 0); |
| 291 | - unlink(zName); | |
| 291 | + file_delete(zName); | |
| 292 | 292 | } |
| 293 | 293 | db_finalize(&q); |
| 294 | 294 | db_multi_exec("UPDATE vfile SET mtime=NULL WHERE vid=%d AND mrid>0", vid); |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -286,11 +286,11 @@ | |
| 286 | " WHERE vid=%d AND mrid>0", g.zLocalRoot, vid); |
| 287 | while( db_step(&q)==SQLITE_ROW ){ |
| 288 | const char *zName; |
| 289 | |
| 290 | zName = db_column_text(&q, 0); |
| 291 | unlink(zName); |
| 292 | } |
| 293 | db_finalize(&q); |
| 294 | db_multi_exec("UPDATE vfile SET mtime=NULL WHERE vid=%d AND mrid>0", vid); |
| 295 | } |
| 296 | |
| 297 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -286,11 +286,11 @@ | |
| 286 | " WHERE vid=%d AND mrid>0", g.zLocalRoot, vid); |
| 287 | while( db_step(&q)==SQLITE_ROW ){ |
| 288 | const char *zName; |
| 289 | |
| 290 | zName = db_column_text(&q, 0); |
| 291 | file_delete(zName); |
| 292 | } |
| 293 | db_finalize(&q); |
| 294 | db_multi_exec("UPDATE vfile SET mtime=NULL WHERE vid=%d AND mrid>0", vid); |
| 295 | } |
| 296 | |
| 297 |
+3
-3
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -123,12 +123,12 @@ | ||
| 123 | 123 | |
| 124 | 124 | end_request: |
| 125 | 125 | if( out ) fclose(out); |
| 126 | 126 | if( in ) fclose(in); |
| 127 | 127 | closesocket(p->s); |
| 128 | - unlink(zRequestFName); | |
| 129 | - unlink(zReplyFName); | |
| 128 | + file_delete(zRequestFName); | |
| 129 | + file_delete(zReplyFName); | |
| 130 | 130 | free(p); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /* |
| 134 | 134 | ** Start a listening socket and process incoming HTTP requests on |
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | SOCKADDR_IN addr; |
| 147 | 147 | int idCnt = 0; |
| 148 | 148 | int iPort = mnPort; |
| 149 | 149 | Blob options; |
| 150 | 150 | |
| 151 | - if( zStopper ) unlink(zStopper); | |
| 151 | + if( zStopper ) file_delete(zStopper); | |
| 152 | 152 | blob_zero(&options); |
| 153 | 153 | if( zNotFound ){ |
| 154 | 154 | blob_appendf(&options, " --notfound %s", zNotFound); |
| 155 | 155 | } |
| 156 | 156 | if( g.useLocalauth ){ |
| 157 | 157 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -123,12 +123,12 @@ | |
| 123 | |
| 124 | end_request: |
| 125 | if( out ) fclose(out); |
| 126 | if( in ) fclose(in); |
| 127 | closesocket(p->s); |
| 128 | unlink(zRequestFName); |
| 129 | unlink(zReplyFName); |
| 130 | free(p); |
| 131 | } |
| 132 | |
| 133 | /* |
| 134 | ** Start a listening socket and process incoming HTTP requests on |
| @@ -146,11 +146,11 @@ | |
| 146 | SOCKADDR_IN addr; |
| 147 | int idCnt = 0; |
| 148 | int iPort = mnPort; |
| 149 | Blob options; |
| 150 | |
| 151 | if( zStopper ) unlink(zStopper); |
| 152 | blob_zero(&options); |
| 153 | if( zNotFound ){ |
| 154 | blob_appendf(&options, " --notfound %s", zNotFound); |
| 155 | } |
| 156 | if( g.useLocalauth ){ |
| 157 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -123,12 +123,12 @@ | |
| 123 | |
| 124 | end_request: |
| 125 | if( out ) fclose(out); |
| 126 | if( in ) fclose(in); |
| 127 | closesocket(p->s); |
| 128 | file_delete(zRequestFName); |
| 129 | file_delete(zReplyFName); |
| 130 | free(p); |
| 131 | } |
| 132 | |
| 133 | /* |
| 134 | ** Start a listening socket and process incoming HTTP requests on |
| @@ -146,11 +146,11 @@ | |
| 146 | SOCKADDR_IN addr; |
| 147 | int idCnt = 0; |
| 148 | int iPort = mnPort; |
| 149 | Blob options; |
| 150 | |
| 151 | if( zStopper ) file_delete(zStopper); |
| 152 | blob_zero(&options); |
| 153 | if( zNotFound ){ |
| 154 | blob_appendf(&options, " --notfound %s", zNotFound); |
| 155 | } |
| 156 | if( g.useLocalauth ){ |
| 157 |