]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (path_conv::is_binary): Always check for GetBinaryType.
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 9 Oct 2008 09:43:02 +0000 (09:43 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 9 Oct 2008 09:43:02 +0000 (09:43 +0000)
* syscalls.cc (rename): Fix test for just changing case of name on
case insensitive filesystems.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc
winsup/cygwin/syscalls.cc

index 0c8e76ee3c8aeb6d3cfb8a379fbf1f3ca23755ee..30932645cc95343a3b9276c283cceacf1bc82135 100644 (file)
@@ -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>
 
        * path.cc (symlink_info::check_shortcut): Don't check for executability
index 47513ae889bd19573e3f23ac3ee62a5618c83e6e..9b85a93d9ac15af89f851e93815ef7a11fbd0632 100644 (file)
@@ -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.
index 1bbf570e3f1bdd1a1cf49ec9809e9667fb7e2b7a..68bfa93d336e26e5ddca7b437bf18c07e11d5411 100644 (file)
@@ -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 (),
This page took 0.038909 seconds and 5 git commands to generate.