From 205ec3279d32a152f6046ecc6ad66c39f097fa4d Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 25 Apr 2007 19:53:34 +0000 Subject: Make recording complain about every little file I/O problem (error on close() failure and fsync() failure). Why? I guess we will find out the disk is full about 1/2 sector sooner on average when the file APIs actually detect this correctly. :/ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13262 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/mp3_enc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps/codecs/mp3_enc.c') diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c index daa6cfe..08cbb18 100644 --- a/apps/codecs/mp3_enc.c +++ b/apps/codecs/mp3_enc.c @@ -2329,11 +2329,9 @@ static bool on_start_file(struct enc_file_event_data *data) static bool on_end_file(struct enc_file_event_data *data) { - if (!is_file_data_ok(data)) + if (!is_file_data_ok(data) || ci->close(data->rec_file) != 0) return false; - ci->fsync(data->rec_file); - ci->close(data->rec_file); data->rec_file = -1; return true; -- cgit v1.1