Do not remove an empty note file after edit session

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen
2020-11-15 09:21:47 +01:00
committed by Lukas Fleischer
parent e1b5580bdf
commit e3dd92ef71
4 changed files with 4 additions and 21 deletions

View File

@@ -1578,22 +1578,6 @@ unsigned io_get_pid(char *file)
return pid;
}
/*
* Check whether a file is empty.
*/
int io_file_is_empty(char *file)
{
FILE *fp;
int ret = -1;
if (file && (fp = fopen(file, "r"))) {
ret = (fgetc(fp) == '\n' && fgetc(fp) == EOF) || feof(fp);
fclose(fp);
}
return ret;
}
/*
* Check whether two files are equal.
*/