Fossil SCM
Protect against symlink_perm table already existing, should get_checkout_symlink_table() have already been called
Commit
03ba3d9cb29f8dbc1c66f79608df6b476169ecde506fb0bf370e162ae0eb1d63
Parent
7a4bd5cf830693d…
1 file changed
+2
-2
+2
-2
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -283,12 +283,12 @@ | ||
| 283 | 283 | blob_append(&content, "\n", 2); |
| 284 | 284 | zLine = blob_buffer(&content); |
| 285 | 285 | |
| 286 | 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | 287 | * temporary table. */ |
| 288 | - db_multi_exec("CREATE TEMP TABLE symlink_perm(filename TEXT PRIMARY KEY %s)", | |
| 289 | - filename_collation()); | |
| 288 | + db_multi_exec("CREATE TEMP TABLE IF NOT EXISTS symlink_perm(" | |
| 289 | + "filename TEXT PRIMARY KEY %s)", filename_collation()); | |
| 290 | 290 | while( *zLine ){ |
| 291 | 291 | /* Find end of line and replace with NUL. */ |
| 292 | 292 | for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd ); |
| 293 | 293 | *zEnd = 0; |
| 294 | 294 | |
| 295 | 295 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -283,12 +283,12 @@ | |
| 283 | blob_append(&content, "\n", 2); |
| 284 | zLine = blob_buffer(&content); |
| 285 | |
| 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | * temporary table. */ |
| 288 | db_multi_exec("CREATE TEMP TABLE symlink_perm(filename TEXT PRIMARY KEY %s)", |
| 289 | filename_collation()); |
| 290 | while( *zLine ){ |
| 291 | /* Find end of line and replace with NUL. */ |
| 292 | for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd ); |
| 293 | *zEnd = 0; |
| 294 | |
| 295 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -283,12 +283,12 @@ | |
| 283 | blob_append(&content, "\n", 2); |
| 284 | zLine = blob_buffer(&content); |
| 285 | |
| 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | * temporary table. */ |
| 288 | db_multi_exec("CREATE TEMP TABLE IF NOT EXISTS symlink_perm(" |
| 289 | "filename TEXT PRIMARY KEY %s)", filename_collation()); |
| 290 | while( *zLine ){ |
| 291 | /* Find end of line and replace with NUL. */ |
| 292 | for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd ); |
| 293 | *zEnd = 0; |
| 294 | |
| 295 |