commit 0d27c5f4cbb3fee83121ad9c0c12e25efcc8a0af Author: Oswald Buddenhagen <o...@users.sf.net> Date: Wed Apr 4 17:55:13 2007 +0000
avoid crash in case of a rather weird (==misconfigured?) sync state location. src/sync.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sync.c b/src/sync.c index 347dfef..b9bfdb3 100644 --- a/src/sync.c +++ b/src/sync.c @@ -711,10 +711,11 @@ sync_boxes( store_t *mctx, const char *mname, goto bail; } - s = strrchr( dname, '/' ); - *s = 0; - mkdir( dname, 0700 ); - *s = '/'; + if ((s = strrchr( dname, '/' ))) { + *s = 0; + mkdir( dname, 0700 ); + *s = '/'; + } if (lfd < 0) { if ((lfd = open( lname, O_WRONLY|O_CREAT, 0666 )) < 0) goto lferr; ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel