Skip to content

Commit

Permalink
api: correct remove_deprecated_app to not remove in unexpected circ…
Browse files Browse the repository at this point in the history
…umstances

previously Steam was only supposed to be removed for 32bit, however the detection was flawed and it hit the else case even on 64bit and the folder got removed. this resulted in unexpected steam updates being prompted on new installs and anytime the runonce that calls this function ran
  • Loading branch information
theofficialgman committed Oct 14, 2023
1 parent b8c4aa6 commit 715e105
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,8 @@ $message
Would you like to uninstall it now or leave it installed? You will NOT be able to uninstall $app with Pi-Apps later."
userinput_func "$text" "Uninstall now" "Leave installed"
elif [ ! -z "$removal_arch" ] && [ "$arch" != "$removal_arch" ]; then
elif [ ! -z "$removal_arch" ]; then
# remove per-architecture script regardless of the current arch
rm -f "${DIRECTORY}/apps/$app/install-$removal_arch"
return 0
elif [ -z "$message" ] && [ -z "$removal_arch" ] && [ -d "${DIRECTORY}/apps/$app" ] && [ "$app_status" == "installed" ]; then
Expand All @@ -795,9 +796,13 @@ $message
Would you like to uninstall it now or leave it installed? You will NOT be able to uninstall $app with Pi-Apps later."
userinput_func "$text" "Uninstall now" "Leave installed"
else
elif [ -z "$removal_arch" ]; then
# only remove folder if the desired removal arch is unset (so remove on all architectures)
rm -rf "${DIRECTORY}/apps/$app"
return 0
else
# do nothing otherwise
return 0
fi
if [ "$output" == "Uninstall now" ]; then
"${DIRECTORY}/manage" uninstall "$app"
Expand Down

3 comments on commit 715e105

@Botspot
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theofficialgman, this commit broke the function. It returns from the function before uninstalling the app.

@Botspot
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I think line 810 should be removed.

@theofficialgman
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I don't think so. it only returns if the app is not marked as installed already. note that all of this is under one if statement, so the latter elif statements only run if the previous evaluated to false.

Please sign in to comment.