Jerome Forissier | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | |||||
3 | void 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 | } |