]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 7 Jan 2009 14:12:40 +0000 (14:12 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 7 Jan 2009 14:12:40 +0000 (14:12 +0000)
original file has .exe as well.
* path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
apps as binaries.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/path.cc

index c80307170ac73db6642ac05412695e585b03a8d0..2faa2e514787ed6fb58154fb648b89ae45565db1 100644 (file)
@@ -1,3 +1,10 @@
+2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
+       original file has .exe as well.
+       * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
+       apps as binaries.
+
 2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>
 
        Remove unneeded header files from source files throughout.
index 15ad76fc076cb0b248178a96cbe31e5fdd7bf5eb..2ad72b749cfcb087e70c982973dee551cd51cd6d 100644 (file)
@@ -1153,6 +1153,8 @@ fhandler_disk_file::link (const char *newpath)
        }
       else if (!pc.isdir ()
               && pc.is_binary ()
+              && RtlEqualUnicodePathSuffix (pc.get_nt_native_path (),
+                                            L".exe", TRUE)
               && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
                                              L".exe", TRUE))
        {
index f44650a4a93edda4d637c280e1d2752c6864c6ac..da96cde01357c45f5a5f1d3f3f316b33e1ff1283 100644 (file)
@@ -1116,7 +1116,8 @@ path_conv::is_binary ()
   PWCHAR bintest = tp.w_get ();
   DWORD bin;
 
-  return GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
+  return GetBinaryTypeW (get_wide_win32_path (bintest), &bin)
+        && (bin == SCS_32BIT_BINARY || bin == SCS_64BIT_BINARY);
 }
 
 /* Normalize a Win32 path.
This page took 0.039723 seconds and 5 git commands to generate.