mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Use pathcmp for disk name comparisons to enforce case-insensitive uniqueness on Windows
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
23283e3abd
commit
a77f2a5a4c
6 changed files with 60 additions and 25 deletions
|
|
@ -178,16 +178,18 @@ void log_open(const char* file)
|
|||
|
||||
void log_close(const char* file)
|
||||
{
|
||||
if (stdlog != stdout && stdlog != stderr && stdlog != 0) {
|
||||
if (fclose(stdlog) != 0) {
|
||||
FILE* log = stdlog;
|
||||
|
||||
/* fclose() invalidates the stream even on error, so fatal reporting must use stderr. */
|
||||
stdlog = 0;
|
||||
if (log != stdout && log != stderr && log != 0) {
|
||||
if (fclose(log) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error closing the log file '%s'. %s.\n", file, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
stdlog = 0;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue