Skip to content
Snippets Groups Projects
Commit 3e82eb94 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

sbbs_t::fremove() will now, by default, ignore (not log) ENOENT errors

ENOENT = "No such file or directory"

Passing 'true' for the optional 'log_all_errors' parameter overrides this
(logs all errors, including ENOENT).
parent 82f91fff
No related branches found
No related tags found
No related merge requests found
......@@ -1257,9 +1257,9 @@ public:
void errormsg(int line, const char* function, const char *source, const char* action, const char *object
,int access=0, const char *extinfo=NULL);
bool hacklog(const char* prot, const char* text);
void fremove(int line, const char* function, const char *source, const char* path) {
void fremove(int line, const char* function, const char *source, const char* path, bool log_all_errors = false) {
int result = remove(path);
if(result != 0)
if(result != 0 && (log_all_errors == true || errno != ENOENT))
errormsg(line, function, source, ERR_REMOVE, path);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment