diff options
author | Linus Walleij <triad@df.lth.se> | 2007-01-22 08:49:28 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2007-01-22 08:49:28 +0000 |
commit | 070e9b4a25c2384f070f20b92c8101c9e3f58f33 (patch) | |
tree | adcd328b54ed068b69cb1e446a0a43cb211e4198 /examples/emptyfolders.c | |
parent | 2e1c8a3bcaaf9a64e79a72a4da62ddf810a99ecc (diff) | |
download | libmtp-070e9b4a25c2384f070f20b92c8101c9e3f58f33.tar.gz |
General error stack and error handling.
Diffstat (limited to 'examples/emptyfolders.c')
-rw-r--r-- | examples/emptyfolders.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/emptyfolders.c b/examples/emptyfolders.c index 70a909a..916d4e7 100644 --- a/examples/emptyfolders.c +++ b/examples/emptyfolders.c @@ -21,8 +21,10 @@ static void prune_empty_folders(LIBMTP_mtpdevice_t *device, LIBMTP_file_t *files if(found == 0) { // no files claim this as a parent printf("empty folder %u (%s)\n",folderlist->folder_id,folderlist->name); if(do_delete) { - if (LIBMTP_Delete_Object(device,folderlist->folder_id)) { + if (LIBMTP_Delete_Object(device,folderlist->folder_id) != 0) { printf("Couldn't delete folder %u\n",folderlist->folder_id); + LIBMTP_Dump_Errorstack(device); + LIBMTP_Clear_Errorstack(device); } } } |