Kaydet (Commit) f262cfcf authored tarafından Stephan Bergmann's avatar Stephan Bergmann

dconf: fix encoding of set element names

Change-Id: I6aba45a70a9ebee65be34af1036bb515fd2a22b7
üst 2921d677
...@@ -51,17 +51,25 @@ ...@@ -51,17 +51,25 @@
// N ; T ; O // N ; T ; O
// //
// where ";" represents U+003B SEMICOLON; N is an encoding of the node name, // where ";" represents U+003B SEMICOLON; N is an encoding of the node name,
// where each occurrence of U+003B SEMICOLON is replaced by the three // where each occurrence of U+0000 NULL is replace by the three characters
// characters "\3B" and each ocurrence of U+005C REVERSE SOLIDUS is replaced // "\00", each occurrence of U+002F SOLIDUS is replaced by the three
// by the three characters "\5C"; T is an encoding of the full template name, // characters "\2F", each occurrence of U+003B SEMICOLON is replaced by the
// where each occurrence of U+002F SOLIDUS is replaced by the three characters // three characters "\3B", and each ocurrence of U+005C REVERSE SOLIDUS is
// "\2F", each occurrence of U+003B SEMICOLON is replaced by the three // replaced by the three characters "\5C"; T is an encoding of the full
// characters "\3B", and each ocurrence of U+005C REVERSE SOLIDUS is replaced // template name, where each occurrence of U+002F SOLIDUS is replaced by the
// by the three characters "\5C"; and O is "fuse" or "replace", respectively. // three characters "\2F", each occurrence of U+003B SEMICOLON is replaced by
// the three characters "\3B", and each ocurrence of U+005C REVERSE SOLIDUS is
// replaced by the three characters "\5C"; and O is "fuse" or "replace",
// respectively.
// //
// * Set element and property "remove" operations are encoded as dconf key path // * Set element and property "remove" operations are encoded as dconf key path
// segments directly using the node name, and the associated value being a // segments as follows, and the associated value being a GVariant of empty
// GVariant of empty tuple type. // tuple type. For set elements, the dconf key path segment consists of an
// encoding of the node name, where each occurrence of U+0000 NULL is replace
// by the three characters "\00", each occurrence of U+002F SOLIDUS is
// replaced by the three characters "\2F", and each ocurrence of U+005C
// REVERSE SOLIDUS is replaced by the three characters "\5C". For properties,
// the dconf key path segment directly uses the node name.
// //
// * Property and localized property value "fuse" operations map to GVariant // * Property and localized property value "fuse" operations map to GVariant
// instances as follows: // instances as follows:
...@@ -738,7 +746,7 @@ void readDir( ...@@ -738,7 +746,7 @@ void readDir(
continue; continue;
} }
name = seg.copy(0, i1); name = seg.copy(0, i1);
if (!decode(&name, false, false, true)) { if (!decode(&name, true, true, true)) {
continue; continue;
} }
++i1; ++i1;
...@@ -781,6 +789,9 @@ void readDir( ...@@ -781,6 +789,9 @@ void readDir(
} else { } else {
remove = true; remove = true;
name = seg; name = seg;
if (!decode(&name, true, true, false)) {
continue;
}
replace = false; replace = false;
assert(!path.endsWith("/")); assert(!path.endsWith("/"));
GVariantHolder v( GVariantHolder v(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment