diff options
author | Randy Ramos <rramos1295@gmail.com> | 2017-09-06 17:17:40 -0400 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2017-09-08 22:35:36 +0200 |
commit | e943b0605ff7000280bcf190f35f9097a6ae5f67 (patch) | |
tree | 19dd7b096d99915c8277d8a9310efca56acb7740 | |
parent | 8ab3106f6bd4967f145aeefdebe50a776c18c7b9 (diff) | |
download | calcurse-e943b0605ff7000280bcf190f35f9097a6ae5f67.tar.gz calcurse-e943b0605ff7000280bcf190f35f9097a6ae5f67.zip |
URL encode href before saving to sync.db
When pushing objects, the unencoded uri path would be saved into the
sync.db. The unencoded path and the encoded path from the server would
be seen as two different objects, causing both to be resynced
unnecessarily.
Signed-off-by: Randy Ramos <rramos1295@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rwxr-xr-x | contrib/caldav/calcurse-caldav.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 1db4740..84e2638 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -10,6 +10,7 @@ import ssl import subprocess import sys import textwrap +import urllib.parse import xml.etree.ElementTree as etree @@ -242,7 +243,7 @@ def push_object(conn, objhash): etag = next(iter(etagdict.values())) etag = etag.strip('"') - return (href, etag) + return (urllib.parse.quote(href), etag) def push_objects(objhashes, conn, syncdb, etagdict): |