diff options
Diffstat (limited to 'source3/modules/vfs_prealloc.c')
-rw-r--r-- | source3/modules/vfs_prealloc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c index 299f6548a1..2f65e94ea7 100644 --- a/source3/modules/vfs_prealloc.c +++ b/source3/modules/vfs_prealloc.c @@ -108,7 +108,7 @@ static int prealloc_connect( } static int prealloc_open(vfs_handle_struct* handle, - const char * fname, + struct smb_filename *smb_fname, files_struct * fsp, int flags, mode_t mode) @@ -127,7 +127,7 @@ static int prealloc_open(vfs_handle_struct* handle, } *fext = '\0'; - dot = strrchr(fname, '.'); + dot = strrchr(smb_fname->base_name, '.'); if (dot && *++dot) { if (strlen(dot) < sizeof(fext)) { strncpy(fext, dot, sizeof(fext)); @@ -152,7 +152,7 @@ static int prealloc_open(vfs_handle_struct* handle, goto normal_open; } - fd = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); + fd = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); if (fd < 0) { return fd; } @@ -171,7 +171,8 @@ static int prealloc_open(vfs_handle_struct* handle, DEBUG(module_debug, ("%s: preallocating %s (fd=%d) to %lld bytes\n", - MODULE, fname, fd, (long long)size)); + MODULE, smb_fname_str_dbg(smb_fname), fd, + (long long)size)); *psize = size; if (preallocate_space(fd, *psize) < 0) { @@ -186,8 +187,8 @@ normal_open: * preallocation. */ DEBUG(module_debug, ("%s: skipping preallocation for %s\n", - MODULE, fname)); - return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); + MODULE, smb_fname_str_dbg(smb_fname))); + return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); } static int prealloc_ftruncate(vfs_handle_struct * handle, |