From 2f90f227ea9a02a62bb2f344388c070e25b2fb4d Mon Sep 17 00:00:00 2001 From: ptomaine Date: Mon, 22 Sep 2008 07:20:22 +0000 Subject: [PATCH] Avoid using '/media/' as mount point. Fixes http://trac.enlightenment.org/e/ticket/19 SVN revision: 36158 --- src/bin/e_fm.c | 16 ++++++++++++---- src/bin/e_fm_hal.c | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 50af154..f68bb20 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -455,10 +455,18 @@ _e_fm2_cb_mount_ok(void *data) sd = evas_object_smart_data_get(data); if (!sd) return; // safety - sd->id = _e_fm2_client_monitor_add(sd->realpath); - sd->listing = 1; - evas_object_smart_callback_call(data, "dir_changed", NULL); - sd->tmp.iter = 0; + + if (strcmp(sd->mount->mount_point, sd->realpath)) + { + e_fm2_path_set(sd->obj, "/", sd->mount->mount_point); + } + else + { + sd->id = _e_fm2_client_monitor_add(sd->mount->mount_point); + sd->listing = 1; + evas_object_smart_callback_call(data, "dir_changed", NULL); + sd->tmp.iter = 0; + } } static void diff --git a/src/bin/e_fm_hal.c b/src/bin/e_fm_hal.c index 04557e0..385adf7 100644 --- a/src/bin/e_fm_hal.c +++ b/src/bin/e_fm_hal.c @@ -362,11 +362,11 @@ e_fm2_hal_volume_mountpoint_get(E_Volume *v) return strdup(v->mount_point); } - if (v->uuid) + if (v->uuid && v->uuid[0] != '\0') snprintf(buf, sizeof(buf) - 1, "/media/%s", strdup(v->uuid)); - else if (v->label) + else if (v->label && v->label[0] != '\0') snprintf(buf, sizeof(buf) - 1, "/media/%s", strdup(v->label)); - else if ((v->storage) && (v->storage->serial)) + else if ((v->storage) && (v->storage->serial) && v->storage->serial[0] != '\0') snprintf(buf, sizeof(buf) - 1, "/media/%s", strdup(v->storage->serial)); else { -- 2.7.4