From dbdb436a80e2fb75d9fd8ae17192702123c3b530 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 23 May 2013 16:21:46 +0200 Subject: [PATCH] shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir() There is no point in searching for snapdir if not in snapdirseverywhere mode. Signed-off-by: Michael Adam Reviewed-by: Andrew Bartlett --- source3/modules/vfs_shadow_copy2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 94621873628..952b010acf1 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1047,6 +1047,13 @@ static char *shadow_copy2_find_snapdir(TALLOC_CTX *mem_ctx, SMB_VFS_HANDLE_GET_DATA(handle, config, struct shadow_copy2_config, return NULL); + /* + * If the non-snapdisrseverywhere mode, we should not search! + */ + if (!config->snapdirseverywhere) { + return config->snapshot_basepath; + } + path = talloc_asprintf(mem_ctx, "%s/%s", handle->conn->connectpath, smb_fname->base_name); -- 2.11.4.GIT