mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 06:56:28 -05:00
Adds date and time specifier for the log file name.
This commit is contained in:
parent
f6c2ae14de
commit
cb0a280ddc
9 changed files with 154 additions and 31 deletions
15
util.c
15
util.c
|
|
@ -1267,6 +1267,21 @@ void pathcat(char* dst, size_t size, const char* src)
|
|||
memcpy(dst + dst_len, src, src_len + 1);
|
||||
}
|
||||
|
||||
void pathcatc(char* dst, size_t size, char c)
|
||||
{
|
||||
size_t dst_len = strlen(dst);
|
||||
|
||||
if (dst_len + 2 > size) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Path too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
dst[dst_len] = c;
|
||||
dst[dst_len + 1] = 0;
|
||||
}
|
||||
|
||||
void pathimport(char* dst, size_t size, const char* src)
|
||||
{
|
||||
pathcpy(dst, size, src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue