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

ptp2/lib: add a check when deleting files #1059

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

Conversation

Avenger-285714
Copy link

libgphoto2 currently lacks error handling for failed file deletions, potentially leading to unexpected behavior in user-space applications.

libgphoto2 currently lacks error handling for failed file deletions,
potentially leading to unexpected behavior in user-space applications.

Signed-off-by: tuhaowen <[email protected]>
Signed-off-by: WangYuli <[email protected]>
@msmeissn
Copy link
Contributor

this is a bit tricky. See comment above where we ignore the error.

also printf is not the right debugging ;)

@msmeissn msmeissn self-assigned this Nov 19, 2024
@Avenger-285714
Copy link
Author

this is a bit tricky. See comment above where we ignore the error.

Hmm...I'm curious about the rationale behind ignoring the errors.
Without error reporting, applications like some file managers that use libgphoto2 will be blindsided by failed deletions.

also printf is not the right debugging ;)

Yes, yes.
In fact, for this code change, I've referenced the approach used in libmtp...
image

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.

2 participants