How to properly escape weird characters in paths to have a valid filelist?
Miro Hrončok
mhroncok at redhat.com
Fri Jul 2 10:55:43 UTC 2021
On 29. 06. 21 13:32, Miro Hrončok wrote:
> However, I have trouble figuring out how to properly escape a path like this:
>
> /usr/share/data/filename with spaces and "quotes" in it
>
> I've tried the following options with no luck:
>
> '/usr/share/data/filename with spaces and "quotes" in it'
> "/usr/share/data/filename with spaces and \"quotes\" in it"
> "/usr/share/data/filename with spaces and \\"quotes\\" in it"
> "/usr/share/data/filename with spaces and \\\"quotes\\\" in it"
After reading the code of the strtokWithQuotes function:
https://github.com/rpm-software-management/rpm/blob/rpm-4.17.0-beta1/build/files.c#L241
I have the impression that this is currently impossible.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
More information about the Rpm-list
mailing list