Fossil SCM
In "fossil test-var-list --unset", lift the protection of the config table around the delete, which otherwise failed with an authorization error.
Commit
6d6d6906b94c653f510a5ee946ba63f40752dc748306cb9c4496f99bd6b7887b
Parent
b233ae438e9a20a…
1 file changed
+2
+2
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -1063,11 +1063,13 @@ | ||
| 1063 | 1063 | } |
| 1064 | 1064 | db_finalize(&q); |
| 1065 | 1065 | if( zPattern && doUnset ){ |
| 1066 | 1066 | prompt_user("Delete all of the above? (y/N)? ", &ans); |
| 1067 | 1067 | if( blob_str(&ans)[0]=='y' || blob_str(&ans)[0]=='Y' ){ |
| 1068 | + db_unprotect(PROTECT_CONFIG); | |
| 1068 | 1069 | db_multi_exec("DELETE FROM config WHERE name GLOB %Q", zPattern); |
| 1070 | + db_protect_pop(); | |
| 1069 | 1071 | } |
| 1070 | 1072 | blob_reset(&ans); |
| 1071 | 1073 | } |
| 1072 | 1074 | } |
| 1073 | 1075 | |
| 1074 | 1076 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -1063,11 +1063,13 @@ | |
| 1063 | } |
| 1064 | db_finalize(&q); |
| 1065 | if( zPattern && doUnset ){ |
| 1066 | prompt_user("Delete all of the above? (y/N)? ", &ans); |
| 1067 | if( blob_str(&ans)[0]=='y' || blob_str(&ans)[0]=='Y' ){ |
| 1068 | db_multi_exec("DELETE FROM config WHERE name GLOB %Q", zPattern); |
| 1069 | } |
| 1070 | blob_reset(&ans); |
| 1071 | } |
| 1072 | } |
| 1073 | |
| 1074 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -1063,11 +1063,13 @@ | |
| 1063 | } |
| 1064 | db_finalize(&q); |
| 1065 | if( zPattern && doUnset ){ |
| 1066 | prompt_user("Delete all of the above? (y/N)? ", &ans); |
| 1067 | if( blob_str(&ans)[0]=='y' || blob_str(&ans)[0]=='Y' ){ |
| 1068 | db_unprotect(PROTECT_CONFIG); |
| 1069 | db_multi_exec("DELETE FROM config WHERE name GLOB %Q", zPattern); |
| 1070 | db_protect_pop(); |
| 1071 | } |
| 1072 | blob_reset(&ans); |
| 1073 | } |
| 1074 | } |
| 1075 | |
| 1076 |