avoid crash in case of a rather weird (==misconfigured?) sync state
location.
This commit is contained in:
parent
0eb399c672
commit
0d27c5f4cb
|
@ -711,10 +711,11 @@ sync_boxes( store_t *mctx, const char *mname,
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = strrchr( dname, '/' );
|
if ((s = strrchr( dname, '/' ))) {
|
||||||
*s = 0;
|
*s = 0;
|
||||||
mkdir( dname, 0700 );
|
mkdir( dname, 0700 );
|
||||||
*s = '/';
|
*s = '/';
|
||||||
|
}
|
||||||
if (lfd < 0) {
|
if (lfd < 0) {
|
||||||
if ((lfd = open( lname, O_WRONLY|O_CREAT, 0666 )) < 0)
|
if ((lfd = open( lname, O_WRONLY|O_CREAT, 0666 )) < 0)
|
||||||
goto lferr;
|
goto lferr;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user