mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
init: remove file before overwriting
This commit is contained in:
parent
d829752181
commit
db46d22cec
@ -313,6 +313,7 @@ update_file() {
|
|||||||
if [ -f "$UPDATE_DIR/$2" -a -f "$3" ]; then
|
if [ -f "$UPDATE_DIR/$2" -a -f "$3" ]; then
|
||||||
mount -o remount,rw /flash
|
mount -o remount,rw /flash
|
||||||
|
|
||||||
|
rm -f "$3"
|
||||||
StartProgress percent "Updating $1... " "$3" $(stat -t "$UPDATE_DIR/$2" | awk '{print $2}')
|
StartProgress percent "Updating $1... " "$3" $(stat -t "$UPDATE_DIR/$2" | awk '{print $2}')
|
||||||
# use dd here with conv=fsync so that all writes are non-buffered
|
# use dd here with conv=fsync so that all writes are non-buffered
|
||||||
# ensuring accurate progress - take the sync hit during the
|
# ensuring accurate progress - take the sync hit during the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user