From 91d2f6eebffcc8aa492b59c99f429aa41d09e82e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 19 Jul 2007 11:41:17 +0000 Subject: * fhandler.cc (fhandler_base::open): Drop local wpath and upath variables. Call pc.get_object_attr to create object attributes. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto. * syscalls.cc (unlink_nt): Ditto. * path.cc (path_conv::set_normalized_path): Set wide_path to NULL. (path_conv::get_nt_native_path): Drop parameter. Create path in wide_path/uni_path members. (path_conv::get_object_attr): New method to create object attributes. (path_conv::get_wide_win32_path): New method to create Win32 wide path. (path_conv::check): Initialize wide_path to NULL. (path_conv::~path_conv): cfree wide_path. * path.h (class path_conv): New members wide_path and uni_path. Add declarations of get_object_attr and get_wide_win32_path. (path_conv::path_conv): Initialize wide_path to NULL. (path_conv::get_nt_native_path): Drop parameter. --- winsup/cygwin/fhandler.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 1920dbec7..960b37549 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -457,10 +457,6 @@ done: int fhandler_base::open (int flags, mode_t mode) { - WCHAR wpath[CYG_MAX_PATH + 10]; - UNICODE_STRING upath = {0, sizeof (wpath), wpath}; - pc.get_nt_native_path (upath); - int res = 0; HANDLE x; ULONG file_attributes = 0; @@ -475,8 +471,7 @@ fhandler_base::open (int flags, mode_t mode) syscall_printf ("(%s, %p)", get_win32_name (), flags); - InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE | OBJ_INHERIT, - NULL, sa.lpSecurityDescriptor); + pc.get_object_attr (attr, sa); switch (query_open ()) { -- cgit v1.2.3