Skip to content

Commit 03ae1eb

Browse files
improve data fetch logic
1 parent bcdf840 commit 03ae1eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

udroid/src/udroid.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ fetch_distro_data() {
7777
if [[ -f $_path ]]; then
7878
# if not in offline mode, fetch the data from the internet
7979
if ! $offline_mode; then
80+
mv $_path $_path.old
8081
g_spin dot "Fetching distro data.." curl -L -s -o $_path $URL || {
8182
ELOG "[${0}] failed to fetch distro data"
8283
mv $_path.old $_path
@@ -772,7 +773,6 @@ parser() {
772773
else
773774
mkdir $RTCACHE 2> /dev/null
774775
fetch_distro_data $mode
775-
distro_data=${RTCACHE}/distro-data.json.cache
776776
fi
777777

778778
############### START OF OPTION PARSER ##############

0 commit comments

Comments
 (0)