* 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.
This commit is contained in:
parent
4e88323ba0
commit
c32849c5bc
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2008-10-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* path.cc (symlink_info::check_shortcut): Don't check for executability
|
* path.cc (symlink_info::check_shortcut): Don't check for executability
|
||||||
|
|
|
@ -1299,11 +1299,8 @@ path_conv::is_binary ()
|
||||||
tmp_pathbuf tp;
|
tmp_pathbuf tp;
|
||||||
PWCHAR bintest = tp.w_get ();
|
PWCHAR bintest = tp.w_get ();
|
||||||
DWORD bin;
|
DWORD bin;
|
||||||
/* Do NOT check for .exe suffix, otherwise rename(2) misbehaves
|
|
||||||
when renaming files to existing executables with omitted suffix.
|
return GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
|
||||||
strip(1) is a candidate uncovering wrong behaviour here. */
|
|
||||||
return exec_state () == is_executable
|
|
||||||
|| GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize a Win32 path.
|
/* Normalize a Win32 path.
|
||||||
|
|
|
@ -1608,7 +1608,8 @@ rename (const char *oldpath, const char *newpath)
|
||||||
just a request to change the case of the filename. By simply setting
|
just a request to change the case of the filename. By simply setting
|
||||||
the file attributes to INVALID_FILE_ATTRIBUTES (which translates to
|
the file attributes to INVALID_FILE_ATTRIBUTES (which translates to
|
||||||
"file doesn't exist"), all later tests are skipped. */
|
"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 (),
|
if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
|
||||||
newpc.get_nt_native_path (),
|
newpc.get_nt_native_path (),
|
||||||
|
|
Loading…
Reference in New Issue