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

Fix metadata/detail parsing of trash (e.g. *.can) files

broken in commit e1df41ea (7 months ago) when adding the trashman util.
The trashman util would parse/manage these files fine, but the expiration
date, reason, etc. would not be parsed (e.g. logged) in sbbs. :-(
parent 3073a9a3
No related branches found
No related tags found
No related merge requests found
Pipeline #9056 passed
......@@ -65,8 +65,8 @@ bool trash_parse_details(const char* p, struct trash* trash, char* item, size_t
*item = '\0';
else
strlcpy(item, list[0], size);
strListFastDelete(list, /* index: */ 0, /* count: */ 1);
}
if (strListFastDelete(list, /* index: */ 0, /* count: */ 1)) {
trash->added = iniGetDateTime(list, ROOT_SECTION, "t", 0);
trash->expires = iniGetDateTime(list, ROOT_SECTION, "e", 0);
if ((p = iniGetValue(list, ROOT_SECTION, "p", NULL, NULL)) != NULL)
......@@ -75,7 +75,6 @@ bool trash_parse_details(const char* p, struct trash* trash, char* item, size_t
SAFECOPY(trash->user, p);
if ((p = iniGetValue(list, ROOT_SECTION, "r", NULL, NULL)) != NULL)
SAFECOPY(trash->reason, p);
}
strListFree(&list);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment