forked from enlightenment/enlightenment
make new dir creation more clear for error conditions
This commit is contained in:
parent
7ae5da88da
commit
5d6b139f35
|
@ -9586,11 +9586,14 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
|
|||
errno = 0;
|
||||
if (stat(buf, &st) && (errno == ENOENT))
|
||||
{
|
||||
if (dir && ecore_file_mkdir(buf))
|
||||
if (dir)
|
||||
{
|
||||
if (ecore_file_mkdir(buf))
|
||||
{
|
||||
ecore_thread_feedback(eth, strdup(buf));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fd = open(buf, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
||||
|
@ -9611,11 +9614,14 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
|
|||
errno = 0;
|
||||
if (stat(buf, &st) && (errno == ENOENT))
|
||||
{
|
||||
if (dir && ecore_file_mkdir(buf))
|
||||
if (dir)
|
||||
{
|
||||
if (ecore_file_mkdir(buf))
|
||||
{
|
||||
ecore_thread_feedback(eth, strdup(buf));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fd = open(buf, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
||||
|
|
Loading…
Reference in New Issue