From fa9a759f561df361ef5f128c657812811999a437 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 19 Apr 2010 02:09:46 +0000 Subject: [PATCH] use utf8 mount options for some fs's SVN revision: 48116 --- src/bin/e_fm_main.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/bin/e_fm_main.c b/src/bin/e_fm_main.c index e7ccf58..d6cc3b9 100644 --- a/src/bin/e_fm_main.c +++ b/src/bin/e_fm_main.c @@ -955,6 +955,7 @@ EAPI void e_volume_mount(E_Volume *v) { char buf[256]; + char buf2[256]; char *mount_point; Eina_List *opt = NULL; @@ -964,13 +965,31 @@ e_volume_mount(E_Volume *v) mount_point = v->mount_point + 7; // printf("mount %s %s [fs type = %s]\n", v->udi, v->mount_point, v->fstype); - if ((!strcmp(v->fstype, "vfat")) || (!strcmp(v->fstype, "ntfs")) -// || (!strcmp(v->fstype, "iso9660")) || (!strcmp(v->fstype, "udf")) + if ((!strcmp(v->fstype, "vfat")) || + (!strcmp(v->fstype, "ntfs")) ) { snprintf(buf, sizeof(buf), "uid=%i", (int)getuid()); opt = eina_list_append(opt, buf); } + + if ((!strcmp(v->fstype, "vfat")) || + (!strcmp(v->fstype, "ntfs")) || + (!strcmp(v->fstype, "iso9660")) + ) + { + snprintf(buf2, sizeof(buf2), "utf8"); + opt = eina_list_append(opt, buf2); + } + else if ((!strcmp(v->fstype, "fat")) || + (!strcmp(v->fstype, "jfs")) || + (!strcmp(v->fstype, "udf")) + ) + { + snprintf(buf2, sizeof(buf2), "iocharset=utf8"); + opt = eina_list_append(opt, buf2); + } + v->guard = ecore_timer_add(E_FM_MOUNT_TIMEOUT, _e_dbus_vol_mount_timeout, v); v->op = e_hal_device_volume_mount(_e_dbus_conn, v->udi, mount_point, v->fstype, opt, _e_dbus_cb_vol_mounted, v); -- 2.7.4