mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
cSafeFile::Close() now flushes the file
This commit is contained in:
parent
cdea3827d3
commit
7506867fbe
@ -2565,3 +2565,6 @@ Francesco Saverio Schiavarelli <fschiava@libero.it>
|
|||||||
|
|
||||||
Matti Lehtimäki <matti.lehtimaki@gmail.com>
|
Matti Lehtimäki <matti.lehtimaki@gmail.com>
|
||||||
for implementing the setup option "Miscellaneous/Channels wrap"
|
for implementing the setup option "Miscellaneous/Channels wrap"
|
||||||
|
|
||||||
|
Stephan Austermühle <au@hcsd.de>
|
||||||
|
for suggesting to flush the file in cSafeFile::Close()
|
||||||
|
1
HISTORY
1
HISTORY
@ -6379,3 +6379,4 @@ Video Disk Recorder Revision History
|
|||||||
channel.
|
channel.
|
||||||
This obsoletes the PLUGINPARAM patch.
|
This obsoletes the PLUGINPARAM patch.
|
||||||
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
||||||
|
- cSafeFile::Close() now flushes the file (suggested by Stephan Austermühle).
|
||||||
|
4
tools.c
4
tools.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "tools.h"
|
||||||
@ -1423,6 +1423,8 @@ bool cSafeFile::Close(void)
|
|||||||
LOG_ERROR_STR(tempName);
|
LOG_ERROR_STR(tempName);
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
fflush(f);
|
||||||
|
fsync(fileno(f));
|
||||||
if (fclose(f) < 0) {
|
if (fclose(f) < 0) {
|
||||||
LOG_ERROR_STR(tempName);
|
LOG_ERROR_STR(tempName);
|
||||||
result = false;
|
result = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user