main: Do not overwrite existing EDC with template code.

If existing EDC is opened with -t option, then it is not allowed.

@fix T3745
This commit is contained in:
Jaehyun Cho 2016-06-01 22:49:36 +09:00
parent ad16037c4d
commit c3709b5435
1 changed files with 10 additions and 0 deletions

View File

@ -325,6 +325,16 @@ defaults:
snprintf(edc_path, path_size, "%s", (const char *)tmp_path);
eina_tmpstr_del(tmp_path);
}
else
{
//Do not overwrite existing EDC file with template code.
if (*template && ecore_file_exists(edc_path))
{
EINA_LOG_ERR("\"%s\" already exists! Please input another file "
"name with \"-t\" option.\n", edc_path);
exit(0);
}
}
char *s = NULL;
EINA_LIST_FREE(id, s)