rest: do not report error when removing image file

this file might be in a different repository, this is best effort.
master
OpenGnSys Support Team 2023-12-15 11:10:47 +01:00
parent ee09056908
commit 5e8e1c6467
1 changed files with 2 additions and 9 deletions

View File

@ -2771,9 +2771,8 @@ static int og_cmd_delete_image(json_t *element, struct og_msg_params *params)
const char *key, *image;
struct og_dbi *dbi;
dbi_result result;
int rval, err = 0;
json_t *value;
int err = 0;
if (json_typeof(element) != JSON_OBJECT)
return -1;
@ -2835,13 +2834,7 @@ static int og_cmd_delete_image(json_t *element, struct og_msg_params *params)
}
dbi_result_free(result);
rval = unlink(filename);
if (rval) {
og_dbi_close(dbi);
syslog(LOG_ERR, "cannot delete image %s: %s\n",
image, strerror(errno));
return -1;
}
unlink(filename);
og_dbi_close(dbi);
return 0;