s3-shadow-copy2: Remove TODO and fix comments
authorChristof Schmitt <cs@samba.org>
Thu, 26 Jun 2014 19:43:03 +0000 (12:43 -0700)
committerVolker Lendecke <vl@samba.org>
Fri, 27 Jun 2014 04:49:10 +0000 (06:49 +0200)
The patch "s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of
paths" takes care of a case marked as TODO, remove it and adjust the
comments accordingly.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_shadow_copy2.c

index 82149f2cb7f39f085c9f93e9ecac5f6d09245a2a..029b1552089c9683b6a3b92b75039e87c910a031 100644 (file)
@@ -264,7 +264,12 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
                goto no_snapshot;
        }
        if (q[0] == '\0') {
-               /* the name consists of only the GMT token */
+               /*
+                * The name consists of only the GMT token or the GMT
+                * token is at the end of the path. XP seems to send
+                * @GMT- at the end under certain circumstances even
+                * with a path prefix.
+                */
                if (pstripped != NULL) {
                        stripped = talloc_strndup(mem_ctx, name, p - name);
                        if (stripped == NULL) {
@@ -277,12 +282,8 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
        }
        if (q[0] != '/') {
                /*
-                * The GMT token is either at the end of the path
-                * or it is not a complete path component, i.e. the
-                * path component continues after the gmt-token.
-                *
-                * TODO: Is this correct? Or would the GMT tag as the
-                * last component be a valid input?
+                * It is not a complete path component, i.e. the path
+                * component continues after the gmt-token.
                 */
                DEBUG(10, ("q[0] = %d\n", (int)q[0]));
                goto no_snapshot;