Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-07-02 18:00:27 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-07-02 18:00:27 +0400
commitbb82bbe6ff1e97b1e2baba9436676aa9406fcef3 (patch)
tree196d546c8176c195ed6f0204191397961160125b
parent278101de7f2a6d1276c2f670a5ae30425cc5d33b (diff)
* path.cc (path_conv::is_binary): Fix test. Add comment.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc6
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9eecb64ac..cf58c1c65 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (path_conv::is_binary): Fix test. Add comment.
+
2008-06-24 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_bindresvport_sa): Fix usage of last_used_bindresvport.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 0eeee8cd8..c69f9d88e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1314,9 +1314,11 @@ 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
- && RtlEqualUnicodePathSuffix (get_nt_native_path (), L".exe", TRUE)
- && GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
+ || GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
}
/* Normalize a Win32 path.