Fossil SCM

Protect against symlink_perm table already existing, should get_checkout_symlink_table() have already been called

andygoth 2017-10-14 21:37 UTC andygoth-enhanced-symlink
Commit 03ba3d9cb29f8dbc1c66f79608df6b476169ecde506fb0bf370e162ae0eb1d63
1 file changed +2 -2
+2 -2
--- src/checkout.c
+++ src/checkout.c
@@ -283,12 +283,12 @@
283283
blob_append(&content, "\n", 2);
284284
zLine = blob_buffer(&content);
285285
286286
/* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm"
287287
* 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());
290290
while( *zLine ){
291291
/* Find end of line and replace with NUL. */
292292
for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd );
293293
*zEnd = 0;
294294
295295
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button