From 94a139afe5d607b09753eec36127e5b682978c5a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 30 Jun 2009 14:26:32 +0200 Subject: shadow_copy2: The system getrealfilename() can't deal with a 0-length fname This fixes viewing the content of snapshots in the share root directory. We have to treat the filename that *just* consists of "@GMT-YYYY.MM.DD-HH.MM.SS" like the share root, which is the current working directory. --- source3/modules/vfs_shadow_copy2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 5efae3b0ed..eac83fca74 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -476,6 +476,9 @@ static int shadow_copy2_mknod(vfs_handle_struct *handle, static char *shadow_copy2_realpath(vfs_handle_struct *handle, const char *fname, char *resolved_path) { + if (shadow_copy2_match_name(fname) && (fname[GMT_NAME_LEN] == '\0')) { + return SMB_VFS_NEXT_REALPATH(handle, ".", resolved_path); + } SHADOW2_NEXT(REALPATH, (handle, name, resolved_path), char *, NULL); } -- cgit