diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-12-10 16:43:30 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-12-10 16:43:30 +0000 |
commit | cbfb7b1b23fe1e382298b45cbcb214c8d088ac77 (patch) | |
tree | f6d910bd202c12e32ec9561900b61b35ecdaca60 /winsup/cygwin/path.cc | |
parent | 6c64fb2fda86ae252db928f9e5595463b2ae36c5 (diff) | |
download | cygnal-cbfb7b1b23fe1e382298b45cbcb214c8d088ac77.tar.gz cygnal-cbfb7b1b23fe1e382298b45cbcb214c8d088ac77.tar.bz2 cygnal-cbfb7b1b23fe1e382298b45cbcb214c8d088ac77.zip |
* autoload.cc (SHFileOperationA): Drop definition.
* ntdll.h (struct _FILE_RENAME_INFORMATION): Define.
* path.cc (fs_info::update): Note length of rootdir prefix in
root_len.
(get_nt_native_path): New function, taking over functionality of
path_conv::get_nt_native_path.
(path_conv::get_nt_native_path): Just call get_nt_native_path.
* path.h (get_nt_native_path): Declare.
(struct fs_info): New member root_len.
(fs_info::length): New inline method returning root_len.
(path_conv::rootdir): New inline method returning rootdir prefix.
* syscalls.cc (try_to_bin): Rewrite using only system calls.
(unlink_nt): Call try_to_bin with additional handle to open file
parameter.
(statvfs): Use path_conv::rootdir method.
* wincap.h: Define has_recycle_dot_bin throughout.
* wincap.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 49d3aecc3..9b8cd0d78 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -389,7 +389,7 @@ fs_info::update (const char *win32_path) char root_dir [CYG_MAX_PATH]; bool ret; - if (!rootdir (win32_path, root_dir)) + if (!::rootdir (win32_path, root_dir)) { debug_printf ("Cannot get root component of path %s", win32_path); clear (); @@ -411,6 +411,7 @@ fs_info::update (const char *win32_path) ++idx; } name_hash = tmp_name_hash; + root_len = strlen (root_dir); /* I have no idea why, but some machines require SeChangeNotifyPrivilege to access volume information. */ @@ -549,7 +550,7 @@ path_conv::set_normalized_path (const char *path_copy, bool strip_tail) } PUNICODE_STRING -path_conv::get_nt_native_path (UNICODE_STRING &upath) +get_nt_native_path (const char *path, UNICODE_STRING &upath) { if (path[0] != '\\') /* X:\... or NUL, etc. */ { @@ -572,6 +573,12 @@ path_conv::get_nt_native_path (UNICODE_STRING &upath) return &upath; } +PUNICODE_STRING +path_conv::get_nt_native_path (UNICODE_STRING &upath) +{ + return ::get_nt_native_path (path, upath); +} + void warn_msdos (const char *src) { |