mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[fix] If zsync eats dirt during an OTA update, allow to fallback to a full download (#4438)
* On zsync delta failure, offer to retry OTA update with a full download Fix #4429 * Bring the "this may take a while" popup back up before full DL Don't rebuild the local tarball for a full dl, we're ignoring it anyway ;) Co-Authored-By: NiLuJe <ninuje@gmail.com>
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Figure out whether that's a delta or a full download given the number of arguments passed...
|
||||
if [ $# -lt 7 ]; then
|
||||
ZSYNC_MESSAGE="Downloading update data"
|
||||
else
|
||||
ZSYNC_MESSAGE="Computing zsync delta"
|
||||
fi
|
||||
|
||||
# Small zsync wrapper so we can get a pretty spinner while it works...
|
||||
./fbink -q -y -7 -pmh 'Computing zsync delta !'
|
||||
./fbink -q -y -7 -pmh "${ZSYNC_MESSAGE} !"
|
||||
# Clear any potential leftover from the local OTA tarball creation.
|
||||
./fbink -q -y -6 -pm ' '
|
||||
|
||||
@@ -26,7 +33,7 @@
|
||||
usleep 500000
|
||||
# NOTE: Throw stderr to the void because I'm cheating w/ U+FFFD for a blank character,
|
||||
# which FBInk replaces by a blank, but not before shouting at us on stderr ;).
|
||||
./fbink -q -y -7 -pmh "Computing zsync delta ${spin}" 2>/dev/null
|
||||
./fbink -q -y -7 -pmh "${ZSYNC_MESSAGE} ${spin}" 2>/dev/null
|
||||
done
|
||||
done
|
||||
) &
|
||||
|
||||
Reference in New Issue
Block a user