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:
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/syscalls.cc10
2 files changed, 14 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 85a8a9633..507593289 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2011-12-19 Corinna Vinschen <vinschen@redhat.com>
+ * syscalls.cc (rename): Fix typo in comment. Fix condition to handle
+ the case oldpath is no .lnk symlink and newpath points to an existing
+ .lnk symlink or .exe file and no explicit .lnk suffix has been given
+ in oldpath. Add a comment to explain.
+
+2011-12-19 Corinna Vinschen <vinschen@redhat.com>
+
* dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stack
rather than for wincap.is_wow64. Accommodate name change from
wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment.
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index f86e0442a..e96116e84 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2162,7 +2162,7 @@ rename (const char *oldpath, const char *newpath)
{
/* Never append .exe suffix if oldpath had .exe suffix given
explicitely, or if newfile is a binary (in which case the given
- name probably makes sesne as it is), or if the destination
+ name probably makes sense as it is), or if the destination
filename has one of the blessed executable suffixes. */
if (!old_explicit_suffix && oldpc.known_suffix
&& !newpc.is_binary ()
@@ -2174,8 +2174,12 @@ rename (const char *oldpath, const char *newpath)
}
else
{
- if ((RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- &ro_u_lnk, TRUE)
+ /* If the new path is an existing .lnk symlink or a .exe file,
+ but the new path has not been specified with explicit suffix,
+ rename to the new name without suffix, as expected, but also
+ remove the clashing symlink or executable. Did I ever mention
+ how I hate the file suffix idea? */
+ if ((newpc.is_lnk_special ()
|| RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
&ro_u_exe, TRUE))
&& !new_explicit_suffix)