summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-18 14:14:16 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-18 15:06:12 +1100
commit83db71e9a71f01d6a9eea2d1436bd9ee28c250a0 (patch)
treef6edcd9f29a35c569fe96897b257f95c44a2e588 /source4
parent2d4ad4f5048269afcfeece446780855dd3cd5649 (diff)
downloadsamba-83db71e9a71f01d6a9eea2d1436bd9ee28c250a0.tar.gz
samba-83db71e9a71f01d6a9eea2d1436bd9ee28c250a0.tar.bz2
samba-83db71e9a71f01d6a9eea2d1436bd9ee28c250a0.zip
s4-pvfs: when reporting the file name, don't include the :$DATA suffix
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 8c5806d93f..c01799e68c 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -263,6 +263,16 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
NTSTATUS status;
name->original_name = talloc_strdup(name, cifs_name);
+
+ /* remove any :$DATA */
+ p = strrchr(name->original_name, ':');
+ if (p && strcasecmp_m(p, ":$DATA") == 0) {
+ if (p > name->original_name && p[-1] == ':') {
+ p--;
+ }
+ *p = 0;
+ }
+
name->stream_name = NULL;
name->stream_id = 0;
name->has_wildcard = false;