summaryrefslogtreecommitdiff
path: root/obexd/src/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'obexd/src/manager.c')
-rw-r--r--obexd/src/manager.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index 849928603..2bb985b96 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -651,7 +651,10 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
agent->new_name = g_strdup(name);
agent->new_folder = NULL;
} else {
- agent->new_name = g_strdup(slash + 1);
+ if (strlen(slash) == 1)
+ agent->new_name = NULL;
+ else
+ agent->new_name = g_strdup(slash + 1);
agent->new_folder = g_strndup(name, slash - name);
}
}
@@ -722,7 +725,7 @@ int manager_request_authorization(struct obex_transfer *transfer,
dbus_pending_call_unref(call);
- if (!agent || !agent->new_name || agent->auth_reject)
+ if (!agent || agent->auth_reject)
return -EPERM;
*new_folder = agent->new_folder;