forked from jensstein/oandbackup
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Not showing backups of uninstalled packages
- Loading branch information
1 parent
a072c42
commit 2405a54
Showing
3 changed files
with
1 addition
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2405a54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original code was:
not sure how you define the packages in PackageRepository (could have a better name?), but at least this code doesn't look like it does the same:
the original code adds entries with empty backups for packages, that are installed (packageNames parameter) but are not yet in the map. This makes the keys of the map match all installed packages.
The new code removes entries...
So this commit fixes the problem of the newer code, but it does not restore the old behavior (at least it had a purpose at that time, not sure if it is necessary today, it might have solved null pointer problems or assumptions about the keys in the map).
2405a54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty lists into a map is as much useless when considering the safety of the get calls as it gets.
Originally I stuck into the naming logic and went with it and didn't really look at the original implementation (late night), which resulted the bug in alpha01.