summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_shortname.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_shortname.c')
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index b68f60d5e7..fe6fd8e030 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -26,9 +26,10 @@
/*
return the short name for a given entry in a directory
+ TODO: this is obviously not very useful in its current form !
*/
-char *pvfs_short_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
- const char *unix_path, const char *name)
+char *pvfs_short_name(struct pvfs_state *pvfs, struct pvfs_filename *name)
{
- return talloc_strndup(mem_ctx, name, 12);
+ char *p = strrchr(name->full_name, '/');
+ return talloc_strndup(name, p+1, 12);
}