int i;
Ecore_Exe *exe;
int tmpn_fd, tmpo_fd;
- char tmpn[PATH_MAX];
- char tmpo[PATH_MAX];
+ Eina_Tmpstr *tmpn;
+ Eina_Tmpstr *tmpo;
char *errstr;
};
unlink(sc->tmpn);
unlink(sc->tmpo);
+ eina_tmpstr_del(sc->tmpn);
+ eina_tmpstr_del(sc->tmpo);
close(sc->tmpn_fd);
close(sc->tmpo_fd);
}
char inc_path[PATH_MAX] = "";
int i;
- if (!tmp_dir)
-#ifdef HAVE_EVIL
- tmp_dir = (char *)evil_tmpdir_get();
-#else
- tmp_dir = "/tmp";
-#endif
-
#ifdef _WIN32
# define BIN_EXT ".exe"
#else
sc->ef = ef;
sc->cd = cd;
sc->i = i;
- snprintf(sc->tmpn, PATH_MAX, "%s/edje_cc.sma-tmp-XXXXXX", tmp_dir);
- sc->tmpn_fd = mkstemp(sc->tmpn);
+ sc->tmpn_fd = eina_file_mkstemp("edje_cc.sma-tmp-XXXXXX", &sc->tmpn);
if (sc->tmpn_fd < 0)
error_and_abort(ef, "Unable to open temp file \"%s\" for script "
"compilation.", sc->tmpn);
- snprintf(sc->tmpo, PATH_MAX, "%s/edje_cc.amx-tmp-XXXXXX", tmp_dir);
- sc->tmpo_fd = mkstemp(sc->tmpo);
+ sc->tmpo_fd = eina_file_mkstemp("edje_cc.amx-tmp-XXXXXX", &sc->tmpo);
if (sc->tmpo_fd < 0)
{
unlink(sc->tmpn);
+ eina_tmpstr_del(sc->tmpn);
error_and_abort(ef, "Unable to open temp file \"%s\" for script "
"compilation.", sc->tmpo);
}