Name the stored strings instead of implying booleans
The note explained a string comparison but wrote the values as if they were booleans, which is the exact confusion it exists to clear up. Both places now say which string was stored and which one the daemon accepts.
This commit is contained in:
1 parent
3c8d247b28
commit
ca4c906814
2 files changed
+11
-7
No files matched your search
+6
-4
@@ -96,11 +96,13 @@ Acceptance criteria:
|
|||||||
- [x] Reject negative and malformed numeric values with useful messages.
|
- [x] Reject negative and malformed numeric values with useful messages.
|
||||||
- [x] Do not pass `None` as a Seafile configuration value. Booleans are also
|
- [x] Do not pass `None` as a Seafile configuration value. Booleans are also
|
||||||
rendered as `true`/`false` rather than Python's `True`/`False`. This fixed
|
rendered as `true`/`false` rather than Python's `True`/`False`. This fixed
|
||||||
`DISABLE_VERIFY_CERTIFICATE`, which never worked: the daemon reads the key
|
`DISABLE_VERIFY_CERTIFICATE`, which never worked. The daemon reads the key
|
||||||
with `seafile_session_config_get_bool`, which is
|
with `seafile_session_config_get_bool`, which is
|
||||||
`g_strcmp0(value, "true") == 0`, so the stored `True` was false and
|
`g_strcmp0(value, "true") == 0`, so it accepts only the exact string
|
||||||
verification stayed on for anyone who asked to disable it. The default was
|
`"true"`. Python's `str(True)` stored the string `"True"`, which did not
|
||||||
never affected, because anything other than `true` is false.
|
match and was therefore read as false, leaving verification on for anyone
|
||||||
|
who asked to disable it. The default stored the string `"False"`, which is
|
||||||
|
also not `"true"` and so was correctly read as false.
|
||||||
|
|
||||||
Acceptance criteria:
|
Acceptance criteria:
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,11 @@ volumes:
|
|||||||
- `DISABLE_VERIFY_CERTIFICATE` - set to _true_ to disable server's certificate
|
- `DISABLE_VERIFY_CERTIFICATE` - set to _true_ to disable server's certificate
|
||||||
verification. Default value is _false_. Booleans accept _true_/_false_,
|
verification. Default value is _false_. Booleans accept _true_/_false_,
|
||||||
_1_/_0_, _yes_/_no_ and _on_/_off_, in any case. Note that this setting had no
|
_1_/_0_, _yes_/_no_ and _on_/_off_, in any case. Note that this setting had no
|
||||||
effect in released images up to and including 0.0.13: the value reached the
|
effect in released images up to and including 0.0.13: whatever you set the
|
||||||
Seafile daemon capitalised, which it does not recognise, so verification
|
variable to, the client stored the string `True`, and the Seafile daemon
|
||||||
stayed on even when the variable was set. The default was never affected.
|
accepts only the lowercase string `true`, so verification stayed on even when
|
||||||
|
the variable was set. The default was never affected, because the string
|
||||||
|
`False` is also not `true`.
|
||||||
- `UPLOAD_LIMIT` / `DOWNLOAD_LIMIT` - upload/download speed limit in B/s
|
- `UPLOAD_LIMIT` / `DOWNLOAD_LIMIT` - upload/download speed limit in B/s
|
||||||
(bytes per second). Default values are _0_ (unlimited).
|
(bytes per second). Default values are _0_ (unlimited).
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user