summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-02-28 13:36:26 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-02-28 13:36:26 +0100
commit7506867fbe30b772c025ef8dc29cba3d4ec65b7f (patch)
tree0393bf16598f0c4929de21334dccbf34f1fe29f5
parentcdea3827d3c35154da0522e55b3729a4de2ebd0f (diff)
downloadvdr-7506867fbe30b772c025ef8dc29cba3d4ec65b7f.tar.gz
vdr-7506867fbe30b772c025ef8dc29cba3d4ec65b7f.tar.bz2
cSafeFile::Close() now flushes the file
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY1
-rw-r--r--tools.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0e8ae820..5b65c3af 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2565,3 +2565,6 @@ Francesco Saverio Schiavarelli <fschiava@libero.it>
Matti Lehtimäki <matti.lehtimaki@gmail.com>
for implementing the setup option "Miscellaneous/Channels wrap"
+
+Stephan Austermühle <au@hcsd.de>
+ for suggesting to flush the file in cSafeFile::Close()
diff --git a/HISTORY b/HISTORY
index f60d5601..1de58b99 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6379,3 +6379,4 @@ Video Disk Recorder Revision History
channel.
This obsoletes the PLUGINPARAM patch.
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
+- cSafeFile::Close() now flushes the file (suggested by Stephan Austermühle).
diff --git a/tools.c b/tools.c
index 39c17e2b..c989e267 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.6 2009/12/23 15:12:15 kls Exp $
+ * $Id: tools.c 2.7 2010/02/28 13:31:46 kls Exp $
*/
#include "tools.h"
@@ -1423,6 +1423,8 @@ bool cSafeFile::Close(void)
LOG_ERROR_STR(tempName);
result = false;
}
+ fflush(f);
+ fsync(fileno(f));
if (fclose(f) < 0) {
LOG_ERROR_STR(tempName);
result = false;