summaryrefslogtreecommitdiff
path: root/obexd
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2016-06-30 17:01:27 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-07-04 14:32:44 +0300
commit16102009366f25a7ba3531c235d65461b5012372 (patch)
treee0f72919df8a5785ac564c6f1d11989c8efaf194 /obexd
parentfaac2826032b65f55ec93c765a49059d10dbf3bf (diff)
downloadbluez-16102009366f25a7ba3531c235d65461b5012372.tar.gz
obexd: Allow CreateFolder to create a directory
When the remote device sends the 'CreateFolder' command, obexd first tries to verify the path in ftp_setpath(). Because we are creating a new directory, the verify_path() is expected to fail (it does not exist yet; ENOENT). Trap that special case and cause the function to fail directly to the create directory path.
Diffstat (limited to 'obexd')
-rw-r--r--obexd/plugins/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c
index a906527c5..3ee18a619 100644
--- a/obexd/plugins/ftp.c
+++ b/obexd/plugins/ftp.c
@@ -278,6 +278,8 @@ int ftp_setpath(struct obex_session *os, void *user_data)
DBG("Fullname: %s", fullname);
err = verify_path(fullname);
+ if (err == -ENOENT)
+ goto not_found;
if (err < 0)
goto done;