1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of paths

The previous clause in shadow_copy2_strip_snapshot would only handle @GMT-
at the end of a pathname if it was the *only* pathname component. XP
seems to send @GMT- at the end under certain circumstances even with a
path prefix.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
Volker Lendecke 2012-10-15 18:16:44 +02:00
parent 68c7b339cc
commit 16a6181289

View File

@ -263,10 +263,10 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
DEBUG(10, ("timestamp==-1\n"));
goto no_snapshot;
}
if ((p == name) && (q[0] == '\0')) {
if (q[0] == '\0') {
/* the name consists of only the GMT token */
if (pstripped != NULL) {
stripped = talloc_strdup(mem_ctx, "");
stripped = talloc_strndup(mem_ctx, name, p - name);
if (stripped == NULL) {
return false;
}