Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Use transactions while creating symlink_perm table |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | andygoth-enhanced-symlink |
| Files: | files | file ages | folders |
| SHA3-256: |
f42ee09a091eb9de1372b980c5aab2b5 |
| User & Date: | andygoth 2017-10-14 22:03:21.975 |
Context
|
2017-10-14
| ||
| 22:19 | Correct sense of _WIN32 conditional compilation ... (check-in: 1226e3ef52 user: andygoth tags: andygoth-enhanced-symlink) | |
| 22:03 | Use transactions while creating symlink_perm table ... (check-in: f42ee09a09 user: andygoth tags: andygoth-enhanced-symlink) | |
| 22:03 | Additional corrections to Windows symlink permissions logic ... (check-in: f29c8a44be user: andygoth tags: andygoth-enhanced-symlink) | |
Changes
Changes to src/checkout.c.
| ︙ | ︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
* by forcing it to end with newline-NUL. */
blob_read_from_file(&content, zFile);
blob_append(&content, "\n", 2);
zLine = blob_buffer(&content);
/* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm"
* temporary table. */
db_multi_exec("CREATE TEMP TABLE IF NOT EXISTS symlink_perm("
"filename TEXT PRIMARY KEY %s)", filename_collation());
while( *zLine ){
/* Find end of line and replace with NUL. */
for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd );
*zEnd = 0;
/* If not a blank line, insert filename into symlink table. */
if( *zLine ){
db_multi_exec("INSERT OR IGNORE INTO symlink_perm VALUES(%Q)", zLine);
}
/* Find start of next line, or find terminating NUL at end of file. */
for( zLine = zEnd+1; *zLine=='\r' || *zLine=='\n'; ++zLine );
}
blob_reset(&content);
/* Let the caller know the "symlink_perm" table was created and is valid. */
return 1;
}
#endif
| > > | 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
* by forcing it to end with newline-NUL. */
blob_read_from_file(&content, zFile);
blob_append(&content, "\n", 2);
zLine = blob_buffer(&content);
/* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm"
* temporary table. */
db_begin_transaction();
db_multi_exec("CREATE TEMP TABLE IF NOT EXISTS symlink_perm("
"filename TEXT PRIMARY KEY %s)", filename_collation());
while( *zLine ){
/* Find end of line and replace with NUL. */
for( zEnd = zLine; *zEnd!='\r' && *zEnd!='\n'; ++zEnd );
*zEnd = 0;
/* If not a blank line, insert filename into symlink table. */
if( *zLine ){
db_multi_exec("INSERT OR IGNORE INTO symlink_perm VALUES(%Q)", zLine);
}
/* Find start of next line, or find terminating NUL at end of file. */
for( zLine = zEnd+1; *zLine=='\r' || *zLine=='\n'; ++zLine );
}
db_end_transaction(0);
blob_reset(&content);
/* Let the caller know the "symlink_perm" table was created and is valid. */
return 1;
}
#endif
|
| ︙ | ︙ |