diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/efreet/efreet_base.c | 5 | ||||
-rw-r--r-- | src/lib/elementary/elm_config.c | 28 | ||||
-rw-r--r-- | src/lib/elput/elput_evdev.c | 11 |
3 files changed, 12 insertions, 32 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c index 506d2e89a4..d510cde10e 100644 --- a/src/lib/efreet/efreet_base.c +++ b/src/lib/efreet/efreet_base.c | |||
@@ -311,9 +311,8 @@ efreet_dirs_init(void) | |||
311 | #endif | 311 | #endif |
312 | 312 | ||
313 | /* xdg_runtime_dir */ | 313 | /* xdg_runtime_dir */ |
314 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/"); | 314 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, |
315 | efl_vpath_file_do(file_obj); | 315 | "(:run:)/"); |
316 | efl_vpath_file_wait(file_obj); | ||
317 | xdg_runtime_dir = eina_stringshare_add(efl_vpath_file_result_get(file_obj)); | 316 | xdg_runtime_dir = eina_stringshare_add(efl_vpath_file_result_get(file_obj)); |
318 | efl_del(file_obj); | 317 | efl_del(file_obj); |
319 | 318 | ||
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index 58dd95e9e8..48330cdfcf 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c | |||
@@ -615,9 +615,6 @@ _elm_config_user_dir_snprintf(char *dst, | |||
615 | va_list ap; | 615 | va_list ap; |
616 | Efl_Vpath_File *file_obj; | 616 | Efl_Vpath_File *file_obj; |
617 | static int use_xdg_config = -1; | 617 | static int use_xdg_config = -1; |
618 | const char elmdir[] = "elementary"; | ||
619 | const char elmdotdir[] = ".elementary"; | ||
620 | const char *path = NULL; | ||
621 | 618 | ||
622 | if (use_xdg_config == -1) | 619 | if (use_xdg_config == -1) |
623 | { | 620 | { |
@@ -625,26 +622,15 @@ _elm_config_user_dir_snprintf(char *dst, | |||
625 | else use_xdg_config = 0; | 622 | else use_xdg_config = 0; |
626 | } | 623 | } |
627 | if (use_xdg_config) | 624 | if (use_xdg_config) |
628 | { | 625 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, |
629 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:config:)/"); | 626 | "(:config:)/elementary"); |
630 | efl_vpath_file_do(file_obj); | ||
631 | efl_vpath_file_wait(file_obj); | ||
632 | path = efl_vpath_file_result_get(file_obj); | ||
633 | user_dir_len = eina_str_join_len | ||
634 | (dst, size, '/', path, strlen(path) - 1, elmdir, sizeof(elmdir) - 1); | ||
635 | efl_del(file_obj); | ||
636 | } | ||
637 | else | 627 | else |
638 | { | 628 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, |
639 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:home:)/"); | 629 | "(:home:)/.elementary"); |
640 | efl_vpath_file_do(file_obj); | 630 | eina_strlcpy(dst, efl_vpath_file_result_get(file_obj), size); |
641 | efl_vpath_file_wait(file_obj); | 631 | efl_del(file_obj); |
642 | path = efl_vpath_file_result_get(file_obj); | ||
643 | user_dir_len = eina_str_join_len | ||
644 | (dst, size, '/', path, strlen(path) - 1, elmdotdir, sizeof(elmdotdir) - 1); | ||
645 | efl_del(file_obj); | ||
646 | } | ||
647 | 632 | ||
633 | user_dir_len = strlen(dst); | ||
648 | off = user_dir_len + 1; | 634 | off = user_dir_len + 1; |
649 | if (off >= size) return off; | 635 | if (off >= size) return off; |
650 | dst[user_dir_len] = '/'; | 636 | dst[user_dir_len] = '/'; |
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 8067f24783..e29600ce50 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c | |||
@@ -60,21 +60,16 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat *seat) | |||
60 | static int | 60 | static int |
61 | _keyboard_fd_get(off_t size) | 61 | _keyboard_fd_get(off_t size) |
62 | { | 62 | { |
63 | const char *path; | ||
64 | Eina_Tmpstr *fullname; | 63 | Eina_Tmpstr *fullname; |
65 | long flags; | 64 | long flags; |
66 | int fd = 0; | 65 | int fd = 0; |
67 | char tmp[PATH_MAX]; | ||
68 | Efl_Vpath_File *file_obj; | 66 | Efl_Vpath_File *file_obj; |
69 | 67 | ||
70 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/"); | 68 | file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, |
71 | efl_vpath_file_do(file_obj); | 69 | "(:run:)/elput-keymap-XXXXXX"); |
72 | efl_vpath_file_wait(file_obj); | 70 | fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname); |
73 | path = efl_vpath_file_result_get(file_obj); | ||
74 | snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XXXXXX", path); | ||
75 | efl_del(file_obj); | 71 | efl_del(file_obj); |
76 | 72 | ||
77 | fd = eina_file_mkstemp(tmp, &fullname); | ||
78 | if (fd < 0) return -1; | 73 | if (fd < 0) return -1; |
79 | 74 | ||
80 | flags = fcntl(fd, F_GETFD); | 75 | flags = fcntl(fd, F_GETFD); |