mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
shared/install: Preserve escape characters for escaped unit names
Since switching to extract_first_word with no flags for parsing
unit names in 4c9565eea5
, escape
characters will be stripped from escaped unit names such as
"mnt-persistent\x2dvolume.mount" resulting in the unit not being
configured as defined. Preserve escape characters again for
compatibility with existing preset definitions.
This commit is contained in:
parent
a49945e663
commit
82bd4da71e
@ -2797,7 +2797,7 @@ static int split_pattern_into_name_and_instances(const char *pattern, char **out
|
||||
assert(out_instances);
|
||||
assert(out_unit_name);
|
||||
|
||||
r = extract_first_word(&pattern, &unit_name, NULL, 0);
|
||||
r = extract_first_word(&pattern, &unit_name, NULL, EXTRACT_RETAIN_ESCAPE);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user