summaryrefslogtreecommitdiffstats
path: root/src/AFC.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-31 20:58:42 +0200
committerGravatar Jonathan Beck2008-08-31 20:58:42 +0200
commit7ac3d681889a6a8f9987837ace5465f2967cfff9 (patch)
treeac96888f90b8dd1bf69733f403ebd0c586917f8b /src/AFC.c
parent95e588fae32b17debf26ceaf456b361e06011623 (diff)
downloadlibimobiledevice-7ac3d681889a6a8f9987837ace5465f2967cfff9.tar.gz
libimobiledevice-7ac3d681889a6a8f9987837ace5465f2967cfff9.tar.bz2
fix afc_getattr and more error handling in ifuse.c
Diffstat (limited to 'src/AFC.c')
-rw-r--r--src/AFC.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/AFC.c b/src/AFC.c
index 3828519..b475a06 100644
--- a/src/AFC.c
+++ b/src/AFC.c
@@ -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.