From 7dc448c56fb47ab435b43d597c5517a49582a685 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Tue, 11 Sep 2012 23:06:25 +0000 Subject: [PATCH] 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 --- src/bin/e_widget_fsel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c index 3a63afd77..0464e89cd 100644 --- a/src/bin/e_widget_fsel.c +++ b/src/bin/e_widget_fsel.c @@ -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);