fsel: if file name starts with "/" then it's an absolute path.

not handling "../" and "./" cases here, maybe worth?

This allows screenshots to be saved typing "/tmp/bla.png" (see
previous commit, to shot module)



SVN revision: 76481
This commit is contained in:
Gustavo Sverzut Barbieri 2012-09-11 23:06:25 +00:00
parent 9022690ed6
commit 7dc448c56f
1 changed files with 5 additions and 1 deletions

View File

@ -512,7 +512,11 @@ e_widget_fsel_selection_path_get(Evas_Object *obj)
wd = e_widget_data_get(obj);
s = e_widget_entry_text_get(wd->o_entry);
dir = e_fm2_real_path_get(wd->o_files_fm);
if (s)
if ((dir) && (s) && (s[0] == '/'))
{
eina_stringshare_replace(&wd->path, s);
}
else if (s)
{
snprintf(buf, sizeof(buf), "%s/%s", dir, s);
eina_stringshare_replace(&wd->path, buf);