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

Handle verbosity in extract_appimage for non-returning errors (#1233) #1282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aoxolotl
Copy link

@aoxolotl aoxolotl commented Sep 2, 2023

Added check if verbose flag is set for fprintf ("File exists and file size matches, skipping".). Fixes #1233

@@ -361,7 +361,9 @@ bool extract_appimage(const char* const appimage_path, const char* const _prefix
} else {
struct stat st;
if (!overwrite && stat(prefixed_path_to_extract, &st) == 0 && st.st_size == inode.xtra.reg.file_size) {
fprintf(stderr, "File exists and file size matches, skipping\n");
if (verbose) {
fprintf(stderr, "File exists and file size matches, skipping\n");
Copy link
Author

Choose a reason for hiding this comment

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

This is the only place where I am checking for verbose flag. The other fprintfs were being called before a return so I thought it'd be unwise for verbose == False to block them. Can add in if required.

@probonopd
Copy link
Member

Thanks @aoxolotl. Since we will be switching to https://github.com/AppImage/type2-runtime soon, you might want to send a PR there as well. Thanks!

@aoxolotl
Copy link
Author

aoxolotl commented Sep 2, 2023

Thanks for the review! Can look into type-2 runtime as well 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Silence verbose output when VERBOSE environment variable is not set
2 participants