blob: a7f767d5e9c69afb515c16470c511493392eb66e [file] [log] [blame]
Jerome Forissier64abd782024-10-16 12:04:00 +02001// SPDX-License-Identifier: GPL-2.0
2
3void copy_filename(char *dst, const char *src, int size)
4{
5 if (src && *src && (*src == '"')) {
6 ++src;
7 --size;
8 }
9
10 while ((--size > 0) && src && *src && (*src != '"'))
11 *dst++ = *src++;
12 *dst = '\0';
13}