mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 12:16:44 +02:00
Fix a couple minor issues
Print a warning if remove() fails, and check if the win pointer is null before using it (this is unnecessary but it's correct and shuts coverity up)
This commit is contained in:
@ -358,7 +358,9 @@ int rename_logfile(const char *src, const char *dest, const char *selfkey, const
|
||||
}
|
||||
|
||||
if (file_exists(newpath)) {
|
||||
remove(oldpath);
|
||||
if (remove(oldpath) != 0) {
|
||||
fprintf(stderr, "Warning: remove() failed to remove log path `%s`\n", oldpath);
|
||||
}
|
||||
} else if (rename(oldpath, newpath) != 0) {
|
||||
goto on_error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user