summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_media_harmony.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_media_harmony.c')
-rw-r--r--source3/modules/vfs_media_harmony.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 65673e17fa4..594db83f311 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -1033,35 +1033,32 @@ static void mh_rewinddir(vfs_handle_struct *handle,
* Failure: set errno, return -1
*/
static int mh_mkdir(vfs_handle_struct *handle,
- const char *path,
+ const struct smb_filename *smb_fname,
mode_t mode)
{
int status;
- char *clientPath;
- TALLOC_CTX *ctx;
-
+ struct smb_filename *clientFname = NULL;
+ const char *path = smb_fname->base_name;
DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
if (!is_in_media_files(path))
{
- status = SMB_VFS_NEXT_MKDIR(handle, path, mode);
+ status = SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode);
goto out;
}
- clientPath = NULL;
- ctx = talloc_tos();
-
- if ((status = alloc_get_client_path(handle, ctx,
- path,
- &clientPath)))
- {
+ status = alloc_get_client_smb_fname(handle,
+ talloc_tos(),
+ smb_fname,
+ &clientFname);
+ if (status != 0) {
goto err;
}
- status = SMB_VFS_NEXT_MKDIR(handle, clientPath, mode);
+ status = SMB_VFS_NEXT_MKDIR(handle, clientFname, mode);
err:
- TALLOC_FREE(clientPath);
+ TALLOC_FREE(clientFname);
out:
DEBUG(MH_INFO_DEBUG, ("Leaving with path '%s'\n", path));
return status;