fileio: in envfiles, do not skip lines following empty lines
https://bugs.freedesktop.org/show_bug.cgi?id=63477
This commit is contained in:
@@ -174,7 +174,7 @@ static int parse_line(
|
||||
if (!*l)
|
||||
return 0;
|
||||
|
||||
if (strchr(COMMENTS, *l))
|
||||
if (strchr(COMMENTS "\n", *l))
|
||||
return 0;
|
||||
|
||||
if (startswith(l, ".include ")) {
|
||||
|
||||
@@ -1699,7 +1699,7 @@ int unit_file_query_preset(UnitFileScope scope, const char *name) {
|
||||
if (!*l)
|
||||
continue;
|
||||
|
||||
if (strchr(COMMENTS, *l))
|
||||
if (strchr(COMMENTS "\n", *l))
|
||||
continue;
|
||||
|
||||
if (first_word(l, "enable")) {
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ union dirent_storage {
|
||||
#define WHITESPACE " \t\n\r"
|
||||
#define NEWLINE "\n\r"
|
||||
#define QUOTES "\"\'"
|
||||
#define COMMENTS "#;\n"
|
||||
#define COMMENTS "#;"
|
||||
|
||||
#define FORMAT_BYTES_MAX 8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user