cedric pushed a commit to branch enlightenment-0.17.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=bc0fcae681964422ce6938ce41dc467e96972b4b

commit bc0fcae681964422ce6938ce41dc467e96972b4b
Author: wonguk.jeong <wonguk.je...@samsung.com>
Date:   Tue Jul 8 13:37:15 2014 -0400

    e_fm: fix symlink access bug
    
    Summary:
    There was no checking about absolute path of symbolic link
    In case of symbolic link, use real link (absolute path) and set sd->dev as 
"/"
    
    Fixes T1365
    
    Reviewers: raster, zmike
    
    CC: seoz, cedric
    
    Maniphest Tasks: T1365
    
    Differential Revision: https://phab.enlightenment.org/D1147
---
 src/bin/e_fm.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 96c9551..2e76fff 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -527,10 +527,11 @@ _e_fm2_icon_path(const E_Fm2_Icon *ic, char *buf, int 
buflen)
 {
    int r;
 
-   if (ic->info.link)
-     r = snprintf(buf, buflen, "%s", ic->info.link);
+   if (ic->info.real_link)
+     r = snprintf(buf, buflen, "%s", ic->info.real_link);
    else
      r = snprintf(buf, buflen, "%s/%s", ic->sd->path, ic->info.file);
+
    return r < buflen;
 }
 
@@ -5790,7 +5791,10 @@ _e_fm2_inplace_open(const E_Fm2_Icon *ic)
    if (!_e_fm2_icon_path(ic, buf, sizeof(buf)))
      return -1;
 
-   e_fm2_path_set(ic->sd->obj, ic->info.link ? "/" : ic->sd->dev, buf);
+   e_fm2_path_set(ic->sd->obj,
+                  ic->info.real_link ? "/" : ic->sd->dev,
+                  buf);
+
    return 1;
 }
 

-- 


Reply via email to