diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 1e35e017fb2..f1846afe894 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1442,15 +1442,17 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx, goto out; } - /* Setup a synthetic smb_filename struct */ - smb_fname_new = talloc_zero(mem_ctx, struct smb_filename); - if (!smb_fname_new) { - ret = WERR_NOT_ENOUGH_MEMORY; + /* convert filename to overwrite new name regardless of case */ + status = driver_unix_convert(conn, new_name, &smb_fname_new); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,("move_driver_file_to_download_area: Unable " + "to convert new file name [%s]: %s\n", + new_name, + nt_errstr(status))); + ret = WERR_APP_INIT_FAILURE; goto out; } - smb_fname_new->base_name = new_name; - DEBUG(10,("move_driver_file_to_download_area: copying '%s' to " "'%s'\n", smb_fname_old->base_name, smb_fname_new->base_name));