summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-05 15:56:43 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-05 16:28:52 +0900
commit2ca5075193e27dbc30f26e478019719a5360cc84 (patch)
tree572e538109ae08ad92729a4f1307fdc877754245
parente24366de25c3ae5a26fd1f1e8d77bc4b7c13c0be (diff)
efreet - fix mime file path messing with short paths like /
this fixes T4015 @fix
-rw-r--r--src/lib/efreet/efreet_mime.c7
-rw-r--r--src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m1
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c2
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c1
4 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c
index adfa79053a..87ca8ef414 100644
--- a/src/lib/efreet/efreet_mime.c
+++ b/src/lib/efreet/efreet_mime.c
@@ -711,10 +711,13 @@ efreet_mime_special_check(const char *file)
711 parent[PATH_MAX - 1] = '\0'; 711 parent[PATH_MAX - 1] = '\0';
712 712
713 /* Kill any trailing slash */ 713 /* Kill any trailing slash */
714 parent[--path_len] = '\0'; 714 if (parent[path_len - 1] == '/')
715 parent[--path_len] = '\0';
715 716
716 /* Truncate to last slash */ 717 /* Truncate to last slash */
717 while (parent[--path_len] != '/') parent[path_len] = '\0'; 718 while ((path_len > 0) &&
719 (parent[--path_len] != '/'))
720 parent[path_len] = '\0';
718 721
719#ifdef _WIN32 722#ifdef _WIN32
720 if (!stat(file, &s2)) 723 if (!stat(file, &s2))
diff --git a/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m b/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m
index 15dc218d82..7df919f0e4 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m
+++ b/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m
@@ -120,6 +120,7 @@ eng_window_free(Evas_GL_Cocoa_Window *gw)
120void 120void
121eng_window_use(Evas_GL_Cocoa_Window *gw) 121eng_window_use(Evas_GL_Cocoa_Window *gw)
122{ 122{
123 if ((gw) && (!gw->gl_context)) return;
123 if (_evas_gl_cocoa_window != gw) 124 if (_evas_gl_cocoa_window != gw)
124 { 125 {
125 [[(NSOpenGLView*)gw->view openGLContext] makeCurrentContext]; 126 [[(NSOpenGLView*)gw->view openGLContext] makeCurrentContext];
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 59361e11e0..f5e2edf7ce 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -676,6 +676,8 @@ eng_window_use(Outbuf *gw)
676 xwin = _tls_outbuf_get(); 676 xwin = _tls_outbuf_get();
677 677
678 glsym_evas_gl_preload_render_lock(eng_window_make_current, gw); 678 glsym_evas_gl_preload_render_lock(eng_window_make_current, gw);
679 if ((gw) && (!gw->gl_context)) return;
680
679#ifdef GL_GLES 681#ifdef GL_GLES
680 if (xwin) 682 if (xwin)
681 { 683 {
diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
index 489a475315..14e13ff264 100644
--- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c
+++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
@@ -233,6 +233,7 @@ eng_window_use(Outbuf *gw)
233 Eina_Bool force = EINA_FALSE; 233 Eina_Bool force = EINA_FALSE;
234 234
235 glsym_evas_gl_preload_render_lock(eng_preload_make_current, gw); 235 glsym_evas_gl_preload_render_lock(eng_preload_make_current, gw);
236 if ((gw) && (!gw->gl_context)) return;
236 237
237 if (_evas_gl_wl_window) 238 if (_evas_gl_wl_window)
238 { 239 {