forked from enlightenment/efl
fileselector: Fixed that data of "done" signal may start with two slash
When moved to root(/) and typed something in name_entry, ok button sent //something as as data of "done" signal. This patch checked current path string not to concatenate two slash.
This commit is contained in:
parent
69c25adea4
commit
a1a87c102e
|
@ -990,7 +990,13 @@ _ok(void *data,
|
|||
|
||||
name = elm_object_text_get(sd->name_entry);
|
||||
if (name && name[0] != '\0')
|
||||
selection = eina_stringshare_printf("%s/%s", sd->path, name);
|
||||
{
|
||||
int len = eina_stringshare_strlen(sd->path);
|
||||
if (sd->path[len - 1] == '/')
|
||||
selection = eina_stringshare_printf("%s%s", sd->path, name);
|
||||
else
|
||||
selection = eina_stringshare_printf("%s/%s", sd->path, name);
|
||||
}
|
||||
else
|
||||
selection = eina_stringshare_add(elm_fileselector_selected_get(fs));
|
||||
|
||||
|
|
Loading…
Reference in New Issue