discomfitor pushed a commit to branch master.

commit 5d6b139f353491fc4caae0a83fb0883fe2c6cb35
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue May 28 14:37:53 2013 +0100

    make new dir creation more clear for error conditions
---
 src/bin/e_fm.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 95d125c..68548d2 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -9586,10 +9586,13 @@ _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)
           {
-             ecore_thread_feedback(eth, strdup(buf));
-             return;
+             if (ecore_file_mkdir(buf))
+               {
+                  ecore_thread_feedback(eth, strdup(buf));
+                  return;
+               }
           }
         else
           {
@@ -9611,10 +9614,13 @@ _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)
                {
-                  ecore_thread_feedback(eth, strdup(buf));
-                  return;
+                  if (ecore_file_mkdir(buf))
+                    {
+                       ecore_thread_feedback(eth, strdup(buf));
+                       return;
+                    }
                }
              else
                {

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may

Reply via email to