Kouhei Sutou
null+****@clear*****
Mon Jun 5 16:33:17 JST 2017
Kouhei Sutou 2017-06-05 16:33:17 +0900 (Mon, 05 Jun 2017) New Revision: 0c1b0479d590886438f67e36d9875ddba86a9173 https://github.com/groonga/groonga/commit/0c1b0479d590886438f67e36d9875ddba86a9173 Message: Improve unlink error handling Modified files: lib/ii.c Modified: lib/ii.c (+6 -5) =================================================================== --- lib/ii.c 2017-06-05 16:32:09 +0900 (205687e) +++ lib/ii.c 2017-06-05 16:33:17 +0900 (7a6d20d) @@ -10322,12 +10322,13 @@ grn_ii_buffer_close(grn_ctx *ctx, grn_ii_buffer *ii_buffer) } if (ii_buffer->tmpfd != -1) { grn_close(ii_buffer->tmpfd); - if (grn_unlink(ii_buffer->tmpfpath) != 0) { - ERRNO_ERR("failed to remove path on grn_ii_buffer_close(): <%s>", - ii_buffer->tmpfpath); - } else { + if (grn_unlink(ii_buffer->tmpfpath) == 0) { GRN_LOG(ctx, GRN_LOG_INFO, - "removed path on grn_ii_buffer_close(): <%s>", ii_buffer->tmpfpath); + "[ii][buffer][close] removed temporary path: <%s>", + ii_buffer->tmpfpath); + } else { + ERRNO_ERR("[ii][buffer][close] failed to remove temporary path: <%s>", + ii_buffer->tmpfpath); } } if (ii_buffer->block_buf) { -------------- next part -------------- HTML����������������������������...Download