summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ideviceinstaller.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index e1f995b..fc22446 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -491,8 +491,9 @@ static int afc_upload_file(afc_client_t afc, const char* filename, const char* d
uint32_t written, total = 0;
while (total < amount) {
written = 0;
- if (afc_file_write(afc, af, buf, amount, &written) != AFC_E_SUCCESS) {
- fprintf(stderr, "AFC Write error!\n");
+ afc_error_t aerr = afc_file_write(afc, af, buf, amount, &written);
+ if (aerr != AFC_E_SUCCESS) {
+ fprintf(stderr, "AFC Write error: %d\n", aerr);
break;
}
total += written;