aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-24 12:57:59 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-24 12:57:59 +0900
commitbedf4969a48b93bc26d2e3528dea271e958b423b (patch)
tree21876df4cd2f27271c34de55cd7838b5ae4ae9f5
parent90ecf25935163fa58aa86a554c4e94b3c3bc2640 (diff)
downloadenlightenment-bedf4969a48b93bc26d2e3528dea271e958b423b.tar.gz
enlightenment-bedf4969a48b93bc26d2e3528dea271e958b423b.tar.xz
enlightenment-bedf4969a48b93bc26d2e3528dea271e958b423b.zip
fix relative path opening in efm... if link is relative it was broken.HEADmaster
-rw-r--r--src/bin/e_fm.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 06eb9545d..bbd3791c4 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -528,7 +528,22 @@ _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.link[0] == '/')
+ r = snprintf(buf, buflen, "%s", ic->info.link);
+ else
+ {
+ char *tmp;
+
+ r = snprintf(buf, buflen, "%s/%s", ic->sd->path, ic->info.file);
+ tmp = ecore_file_realpath(buf);
+ if (tmp)
+ {
+ r = snprintf(buf, buflen, "%s", tmp);
+ free(tmp);
+ }
+ }
+ }
else
r = snprintf(buf, buflen, "%s/%s", ic->sd->path, ic->info.file);
return r < buflen;