mirror of
https://github.com/samba-team/samba.git
synced 2025-09-19 13:44:20 +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:
@@ -263,10 +263,10 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
|
|||||||
DEBUG(10, ("timestamp==-1\n"));
|
DEBUG(10, ("timestamp==-1\n"));
|
||||||
goto no_snapshot;
|
goto no_snapshot;
|
||||||
}
|
}
|
||||||
if ((p == name) && (q[0] == '\0')) {
|
if (q[0] == '\0') {
|
||||||
/* the name consists of only the GMT token */
|
/* the name consists of only the GMT token */
|
||||||
if (pstripped != NULL) {
|
if (pstripped != NULL) {
|
||||||
stripped = talloc_strdup(mem_ctx, "");
|
stripped = talloc_strndup(mem_ctx, name, p - name);
|
||||||
if (stripped == NULL) {
|
if (stripped == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user