From: raster Date: Sun, 22 Apr 2012 04:55:11 +0000 (+0000) Subject: fix bug/issue with shader saving - it will fail to save if dir exists X-Git-Tag: submit/trunk/20120815.174732~414 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd851eb6247889179d8d6a8b55955ef4cd09add3;p=profile%2Fivi%2Fevas.git fix bug/issue with shader saving - it will fail to save if dir exists for saved shaders (but doesnt have the binary file there). fixed! (also compress the file too) git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@70382 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/engines/gl_common/evas_gl_shader.c b/src/modules/engines/gl_common/evas_gl_shader.c index d7ca3b9..f587c98 100644 --- a/src/modules/engines/gl_common/evas_gl_shader.c +++ b/src/modules/engines/gl_common/evas_gl_shader.c @@ -991,7 +991,7 @@ _evas_gl_common_shader_program_binary_save(Evas_GL_Program *p, return 0; } - if (eet_write(ef, pname, data, length, 0) < 0) + if (eet_write(ef, pname, data, length, 1) < 0) { if (data) free(data); return 0; @@ -1196,8 +1196,10 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared) unsigned int i; if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) - res = _evas_gl_shader_file_mkpath(bin_dir_path); - if (!res) return 0; /* we can't make directory */ + { + res = _evas_gl_shader_file_mkpath(bin_dir_path); + if (!res) return 0; /* we can't make directory */ + } _evas_gl_shader_file_check(bin_dir_path, bin_file_path, sizeof(bin_dir_path));