diff options
author | Marek Kasik <mkasik@redhat.com> | 2016-06-30 17:01:27 -0400 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-07-04 14:32:44 +0300 |
commit | 16102009366f25a7ba3531c235d65461b5012372 (patch) | |
tree | e0f72919df8a5785ac564c6f1d11989c8efaf194 /obexd | |
parent | faac2826032b65f55ec93c765a49059d10dbf3bf (diff) | |
download | bluez-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.c | 2 |
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; |