Ecore : ecore_evas : use correct temporary directory on Windows
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 17 Jun 2011 21:49:47 +0000 (21:49 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 17 Jun 2011 21:49:47 +0000 (21:49 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@60468 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_evas/ecore_evas.c

index a5f2827..f5e65ec 100644 (file)
 # include <unistd.h>
 #endif
 
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
 #include "Ecore.h"
 #include "ecore_private.h"
 #include "Ecore_Input.h"
@@ -2715,10 +2719,17 @@ void
 _ecore_evas_fps_debug_init(void)
 {
    char buf[4096];
+   const char *tmp;
 
    _ecore_evas_fps_debug_init_count++;
    if (_ecore_evas_fps_debug_init_count > 1) return;
-   snprintf(buf, sizeof(buf), "/tmp/.ecore_evas_fps_debug-%i", (int)getpid());
+
+#ifndef HAVE_EVIL
+   tmp = "/tmp";
+#else
+   tmp = evil_tmpdir_get ();
+#endif /* HAVE_EVIL */
+   snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i", tmp, (int)getpid());
    _ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
    if (_ecore_evas_fps_debug_fd < 0)
      {