basic/strv: fix splitting of strings with escape characters
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 6 May 2022 16:23:06 +0000 (18:23 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 6 May 2022 16:26:30 +0000 (18:26 +0200)
commitb38a9d2d77c680fb7ae9b6fb6faf9ab4fe9fc555
treea843de5b3253f28b227527dfa0a652a84fd1ac7b
parent34c2d32cf97ddc41348960687e52db6637faf1df
basic/strv: fix splitting of strings with escape characters

Plain strv_split() should not care if the strings contains backslashes
or quote characters. But extract_first_word() interprets backslashes
unless EXTRACT_RETAIN_ESCAPE is given.

I wonder how it's possible that nobody noticed this before. I think this
code was introduced in 0645b83a40d1c782f173c4d8440ab2fc82a75006.
src/basic/strv.h
src/test/test-strv.c