summaryrefslogtreecommitdiff
path: root/obexd/plugins/messages-tizen.c
diff options
context:
space:
mode:
Diffstat (limited to 'obexd/plugins/messages-tizen.c')
-rw-r--r--obexd/plugins/messages-tizen.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/obexd/plugins/messages-tizen.c b/obexd/plugins/messages-tizen.c
index 7613484a..4797da63 100644
--- a/obexd/plugins/messages-tizen.c
+++ b/obexd/plugins/messages-tizen.c
@@ -1154,8 +1154,19 @@ int messages_push_message(void *session, const char *folder,
DBG("session->cwd %s +\n", s->cwd);
- if (folder)
- folder_path = g_strdup(folder);
+ if (g_ascii_strncasecmp(s->cwd, "/telecom/msg",
+ strlen("/telecom/msg")) != 0) {
+ DBG("Path Not Set properly");
+ return -1;
+ }
+
+ if ((folder[0] == '\0') && (g_strcmp0(s->cwd, "/telecom/msg") == 0)) {
+ DBG("Invalid Folders");
+ return -1;
+ }
+
+ if ((folder[0] != '\0'))
+ folder_path = g_strconcat("/telecom/msg/", folder, NULL);
else
folder_path = g_strdup(s->cwd);