diff options
| -rw-r--r-- | include/libiphone/afc.h | 1 | ||||
| -rw-r--r-- | src/AFC.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/libiphone/afc.h b/include/libiphone/afc.h index fe9b1bf..651621e 100644 --- a/include/libiphone/afc.h +++ b/include/libiphone/afc.h | |||
| @@ -58,6 +58,7 @@ extern "C" { | |||
| 58 | #define AFC_E_MUX_ERROR 30 | 58 | #define AFC_E_MUX_ERROR 30 |
| 59 | #define AFC_E_NO_MEM 31 | 59 | #define AFC_E_NO_MEM 31 |
| 60 | #define AFC_E_NOT_ENOUGH_DATA 32 | 60 | #define AFC_E_NOT_ENOUGH_DATA 32 |
| 61 | #define AFC_E_DIR_NOT_EMPTY 33 | ||
| 61 | 62 | ||
| 62 | typedef int16_t afc_error_t; | 63 | typedef int16_t afc_error_t; |
| 63 | 64 | ||
| @@ -500,6 +500,10 @@ afc_error_t afc_remove_path(afc_client_t client, const char *path) | |||
| 500 | if (response) | 500 | if (response) |
| 501 | free(response); | 501 | free(response); |
| 502 | 502 | ||
| 503 | /* special case; unknown error actually means directory not empty */ | ||
| 504 | if (ret == AFC_E_UNKNOWN_ERROR) | ||
| 505 | ret = AFC_E_DIR_NOT_EMPTY; | ||
| 506 | |||
| 503 | afc_unlock(client); | 507 | afc_unlock(client); |
| 504 | 508 | ||
| 505 | return ret; | 509 | return ret; |
