commit 2d4bc1e6138f81bcf160154017f19725cdc21051 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Sat Apr 12 18:31:18 2014 +0200
error-check committing of sync state a failure here is rather unlikely, but let's be pedantic. a failure is not fatal (we'll just enter the journal replay path next time), so only print warnings. found by coverity. src/sync.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sync.c b/src/sync.c index e97efe8..ec7efa0 100644 --- a/src/sync.c +++ b/src/sync.c @@ -1875,8 +1875,10 @@ box_closed_p2( sync_vars_t *svars, int t ) Fclose( svars->jfp, 0 ); if (!(DFlags & KEEPJOURNAL)) { /* order is important! */ - rename( svars->nname, svars->dname ); - unlink( svars->jname ); + if (rename( svars->nname, svars->dname )) + warn( "Warning: cannot commit sync state %s\n", svars->dname ); + else if (unlink( svars->jname )) + warn( "Warning: cannot delete journal %s\n", svars->jname ); } sync_bail( svars ); ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel