summaryrefslogtreecommitdiff
path: root/examples/emptyfolders.c
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2007-01-22 08:49:28 +0000
committerLinus Walleij <triad@df.lth.se>2007-01-22 08:49:28 +0000
commit070e9b4a25c2384f070f20b92c8101c9e3f58f33 (patch)
treeadcd328b54ed068b69cb1e446a0a43cb211e4198 /examples/emptyfolders.c
parent2e1c8a3bcaaf9a64e79a72a4da62ddf810a99ecc (diff)
downloadlibmtp-070e9b4a25c2384f070f20b92c8101c9e3f58f33.tar.gz
General error stack and error handling.
Diffstat (limited to 'examples/emptyfolders.c')
-rw-r--r--examples/emptyfolders.c4
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);
}
}
}