From: Andre Noll Date: Fri, 18 Mar 2011 08:08:07 +0000 (+0100) Subject: open_and_update_audio_file(): Always print file name on errors. X-Git-Tag: v0.4.6~12 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=87c857765884b6d05a2b090fa9509e90d220a2f8;hp=2d6e983de98d9d6382ed0b51a1723e15c40f3793;p=paraslash.git open_and_update_audio_file(): Always print file name on errors. Otherwise, if running with logleve warning or error, we only see the error message but not which file could not be opened. --- diff --git a/afs.c b/afs.c index c2fd6d52..0464eb77 100644 --- a/afs.c +++ b/afs.c @@ -468,7 +468,6 @@ again: } ret = open_and_update_audio_file(aft_row, score, &afd); if (ret < 0) { - PARA_ERROR_LOG("%s\n", para_strerror(-ret)); ret = score_delete(aft_row); if (ret < 0) { PARA_ERROR_LOG("%s\n", para_strerror(-ret)); diff --git a/aft.c b/aft.c index 266188b5..b3dde137 100644 --- a/aft.c +++ b/aft.c @@ -1136,6 +1136,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score, err: free(afd->afhi.chunk_table); osl_close_disk_object(&chunk_table_obj); + if (ret < 0) + PARA_ERROR_LOG("%s: %s\n", path, para_strerror(-ret)); return ret; }