Diff between 4c7d3b167f3e7e480823288ad2c521077df5c67b and 4f4c120e88f0c1ad9c93e081181223a48b8df625

Changed Files

File Additions Deletions Status
obexd/src/ftp.c +3 -1 modified

Full Patch

diff --git a/obexd/src/ftp.c b/obexd/src/ftp.c
index 3d26649..b1903ee 100644
--- a/obexd/src/ftp.c
+++ b/obexd/src/ftp.c
@@ -282,8 +282,10 @@ void ftp_get(obex_t *obex, obex_object_t *obj)
 	if (os == NULL)
 		return;
 
-	if (os->current_folder == NULL)
+	if (os->current_folder == NULL) {
+		err = -ENOENT;
 		goto fail;
+	}
 
 	err = get_by_type(os, os->type, &size);
 	if (err < 0) {