From 45c1af536672b6fd3dff65d4efa7bfd4188e60a4 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Fri, 9 Apr 2010 18:31:17 -0400 Subject: [PATCH] Fixed creating non-existing element paths in the MOVE command. --- NEWS | 23 +++++++++++++++++++++++ README | 1 + src/commands.c | 4 +++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index fd4dc6c4..5072ad93 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +PWMD v2.12 +---------- +This version changes how the elements are accessed and breaks data file +compatibility with previous versions. Conversion is done automatically unless +you have elements in your data file name "element" or attributes named "_name". +The reason for the change is that the XML parser doesn't like commonly used +characters in element names (for example, an email address or digit as the +first character). So the solution is to use an attribute to store the name of +the element and let the actual element be generic. All elements in your data +file will be renamed to "element" with an attribute "_name" being the original +element name. Be sure to make a backup copy of your data file. I hope you find +the change worth it. + +Fixed creating element paths that had children of the same name as the parent. + +Added the MOVE command. This will move an element path to another location in +the document. Faster than a COPY/DELETE. + +Added client option RC_ON_LOCKED. If set, rather than sending a status message +when the file mutex is locked, an error code will be sent instead; stopping +the command. + + PWMD v2.11 ---------- Another fix for the COPY command. This one fixes copy siblings of the source diff --git a/README b/README index ce1d2adc..a27f79d7 100644 --- a/README +++ b/README @@ -90,4 +90,5 @@ The gitweb interface can be viewed at http://repo.or.cz/w/pwmd.git. Please feel free to send me any patches, bug reports or feature requests. Ben Kibbey +Jabber: bjk AT thiessen DOT org - (bjk) FreeNode/OFTC http://bjk.sourceforge.net/pwmd/ diff --git a/src/commands.c b/src/commands.c index 78613e26..d681bb99 100644 --- a/src/commands.c +++ b/src/commands.c @@ -3599,9 +3599,11 @@ static gint move_command(assuan_context_t ctx, gchar *line) } } - if (rc) + if (rc && rc != EPWMD_ELEMENT_NOT_FOUND) goto fail; + rc = 0; + if (!ndst && dst) ndst = create_element_path(client, &dst, &rc); else if (!dst) -- 2.11.4.GIT