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>
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;
}