]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
HTTP: Shut up file delete error message
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 19 Jan 2022 02:27:30 +0000 (20:27 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 19 Jan 2022 02:27:30 +0000 (20:27 -0600)
For #67.

When the file didn't need to be downloaded, because the IMS header did
its job, nothing needs to be deleted. So Fort shouldn't be complaining.

Like the previous commit, this is not a great solution, because IMS is
not the only trigger of file deletes, and the error message might be
helpful in other cases. Then again, I don't really agree with this eager
repository cleaning technique; it complicates debugging.

The proper solution is a WIP in the rrdp-refactor branch.

src/common.c

index 2384f3eaaebd951e4b462706ab37d4b121000fd8..c19389e0dca4c60107ed52c6f087ecc8d6dbc30b 100644 (file)
@@ -306,9 +306,11 @@ remove_file(char const *path)
        errno = 0;
        if (remove(path) != 0) {
                error = errno;
+               /*
                pr_val_err("Couldn't delete '%s': %s", path,
                    strerror(error));
-               return errno;
+                */
+               return error;
        }
 
        return 0;