Skip to content
Open
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
8 changes: 7 additions & 1 deletion camlibs/ptp2/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -9027,6 +9027,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data, GPContext *context)
{
Camera *camera = data;
uint32_t ret;
uint32_t storage;
PTPParams *params = &camera->pl->params;

Expand Down Expand Up @@ -9061,7 +9062,12 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
handle = find_child(params, filename, storage, handle, NULL);

/* in some cases we return errors ... just ignore them for now */
LOG_ON_PTP_E (ptp_deleteobject(params, handle, 0));
ret = ptp_deleteobject(params, handle, 0);
LOG_ON_PTP_E (ret);
if (ret != PTP_RC_OK) {
printf("Could not delete object.\n");
return GP_ERROR;
}

/* On some Canon firmwares, a DeleteObject causes a ObjectRemoved event
* to be sent. At least on Digital IXUS II and PowerShot A85. But
Expand Down