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

Fix bug in error return value of recurisve use of delfiles()

We need to negate the negative return value to get the number of errors.
parent cb28dafe
Branches
Tags
No related merge requests found
......@@ -823,7 +823,7 @@ int delfiles(const char *inpath, const char *spec, size_t keep)
if(recursed >= 0)
files += recursed;
else
errors += recursed;
errors += (-recursed);
if(rmdir(fpath) != 0)
errors++;
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment