TALLOC_CTX *tmp_ctx = talloc_new(handle->data);
const char *snapdir, *relpath, *baseoffset, *basedir;
size_t baselen;
- char *ret;
+ char *ret, *prefix;
struct tm timestamp;
time_t timestamp_t;
return NULL;
}
+ prefix = talloc_asprintf(tmp_ctx, "%s/@GMT-", snapdir);
+ if (strncmp(fname, prefix, strlen(prefix)) == 0) {
+ /* this looks like as we have already normalized it, leave it untouched*/
+ talloc_free(tmp_ctx);
+ return talloc_strdup(handle->data, fname);
+ }
+
if (strncmp(fname, "@GMT-", 5) != 0) {
fname = shadow_copy2_normalise_path(tmp_ctx, fname, gmt_path);
if (fname == NULL) {