diff options
author | Jonathan Beck | 2008-08-31 20:58:42 +0200 |
---|---|---|
committer | Jonathan Beck | 2008-08-31 20:58:42 +0200 |
commit | 7ac3d681889a6a8f9987837ace5465f2967cfff9 (patch) | |
tree | ac96888f90b8dd1bf69733f403ebd0c586917f8b /src/AFC.c | |
parent | 95e588fae32b17debf26ceaf456b361e06011623 (diff) | |
download | libplist-7ac3d681889a6a8f9987837ace5465f2967cfff9.tar.gz libplist-7ac3d681889a6a8f9987837ace5465f2967cfff9.tar.bz2 |
fix afc_getattr and more error handling in ifuse.c
Diffstat (limited to 'src/AFC.c')
-rw-r--r-- | src/AFC.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -593,7 +593,7 @@ iphone_afc_file_t afc_get_file_info(iphone_afc_client_t client, const char *path */ iphone_error_t iphone_afc_get_file_attr ( iphone_afc_client_t client, const char *filename, struct stat *stbuf ) { - int ret = IPHONE_E_SUCCESS; + iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; if (!client ||!client->connection || !client->afc_packet || !stbuf) return IPHONE_E_INVALID_ARG; memset(stbuf, 0, sizeof(struct stat)); @@ -608,8 +608,9 @@ iphone_error_t iphone_afc_get_file_attr ( iphone_afc_client_t client, const char stbuf->st_uid = getuid(); stbuf->st_gid = getgid(); - iphone_afc_close_file(client,file); + ret = iphone_afc_close_file(client,file); } + return ret; } /** Opens a file on the phone. |