commit 1b26cc3d9a611640fbcce697999035f1cca785e7
Author: Oswald Buddenhagen <o...@kde.org>
Date:   Sun Jul 24 20:27:09 2011 +0200

    rely on the maildir's existence with "SyncState *"
    
    now that we open the box first, we know that it will exist at this
    point.

 src/sync.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/sync.c b/src/sync.c
index eb4faad..6ae0b2d 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -621,17 +621,17 @@ box_selected( int sts, void *aux )
                        free( cmname );
                }
                free( csname );
+               if (!(s = strrchr( svars->dname, '/' ))) {
+                       error( "Error: invalid SyncState '%s'\n", svars->dname 
);
+                       goto sbail;
+               }
+               *s = 0;
+               if (mkdir( svars->dname, 0700 ) && errno != EEXIST) {
+                       error( "Error: cannot create SyncState directory '%s': 
%s\n", svars->dname, strerror(errno) );
+                       goto sbail;
+               }
+               *s = '/';
        }
-       if (!(s = strrchr( svars->dname, '/' ))) {
-               error( "Error: invalid SyncState '%s'\n", svars->dname );
-               goto sbail;
-       }
-       *s = 0;
-       if (mkdir( svars->dname, 0700 ) && errno != EEXIST) {
-               error( "Error: cannot create SyncState directory '%s': %s\n", 
svars->dname, strerror(errno) );
-               goto sbail;
-       }
-       *s = '/';
        nfasprintf( &svars->jname, "%s.journal", svars->dname );
        nfasprintf( &svars->nname, "%s.new", svars->dname );
        nfasprintf( &svars->lname, "%s.lock", svars->dname );

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to