Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix total size, by @Azathothas #1185

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions modules/database.am
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,9 @@ _files_appimage_type_notes() {
}

_files_total_size() {
_determine_args
printf "\n"
command -v aisap >/dev/null 2>&1 && printf '%s\n\n' " AppImages with 🔒 are sandboxed with aisap"
TOTAL_SIZE=$(echo "$ARGPATHS" | grep "^$APPSPATH" | du -ch 2>/dev/null | grep "total" | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
TOTAL_SIZE=$(du -shc $(find "$APPSPATH" -maxdepth 2 -type f -name 'remove' -printf "%h\n" 2>/dev/null) | tail -n1 | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
Copy link
Contributor

Choose a reason for hiding this comment

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

all you people ended up doing was add a 2>/dev/null to the original find lol.

@Azathothas was telling that this was unsafe (which I don't see how) but put it back anyway?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also I don't think the tail -n1 is needed since the END in awk does the same.

echo " TOTAL SIZE: $TOTAL_SIZE of disk space in use"
printf "\n"
}
Expand Down