diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-10-09 09:43:02 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-10-09 09:43:02 +0000 |
commit | c32849c5bc5de00a65e542ebeaa20e77c59b3357 (patch) | |
tree | f5e5b1d5bbb750fbe11eba86e9460065495556e3 /winsup/cygwin | |
parent | 4e88323ba05a8667c86fe50686a68322b3eaa779 (diff) | |
download | newlib-c32849c5bc5de00a65e542ebeaa20e77c59b3357.zip newlib-c32849c5bc5de00a65e542ebeaa20e77c59b3357.tar.gz newlib-c32849c5bc5de00a65e542ebeaa20e77c59b3357.tar.bz2 |
* path.cc (path_conv::is_binary): Always check for GetBinaryType.
* syscalls.cc (rename): Fix test for just changing case of name on
case insensitive filesystems.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0c8e76e..3093264 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2008-10-09 Corinna Vinschen <corinna@vinschen.de> + * path.cc (path_conv::is_binary): Always check for GetBinaryType. + * syscalls.cc (rename): Fix test for just changing case of name on + case insensitive filesystems. + +2008-10-09 Corinna Vinschen <corinna@vinschen.de> + * path.cc (symlink_info::check_shortcut): Don't check for executability here. (symlink_info::check_sysfile): Ditto. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 47513ae..9b85a93 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1299,11 +1299,8 @@ path_conv::is_binary () tmp_pathbuf tp; PWCHAR bintest = tp.w_get (); DWORD bin; - /* Do NOT check for .exe suffix, otherwise rename(2) misbehaves - when renaming files to existing executables with omitted suffix. - strip(1) is a candidate uncovering wrong behaviour here. */ - return exec_state () == is_executable - || GetBinaryTypeW (get_wide_win32_path (bintest), &bin); + + return GetBinaryTypeW (get_wide_win32_path (bintest), &bin); } /* Normalize a Win32 path. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 1bbf570..68bfa93 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1608,7 +1608,8 @@ rename (const char *oldpath, const char *newpath) just a request to change the case of the filename. By simply setting the file attributes to INVALID_FILE_ATTRIBUTES (which translates to "file doesn't exist"), all later tests are skipped. */ - if (oldpc.objcaseinsensitive () && newpc.exists () && equal_path) + if (oldpc.objcaseinsensitive () && newpc.exists () && equal_path + && old_explicit_suffix == new_explicit_suffix) { if (RtlEqualUnicodeString (oldpc.get_nt_native_path (), newpc.get_nt_native_path (), |