summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc3
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cb1a29a9a..777e1af99 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2006-07-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_worker): Return EEXIST if newpath exists.
+
2006-07-18 Christopher Faylor <cgf@timesys.com>
* tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 116691670..f857f168e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2757,7 +2757,8 @@ symlink_worker (const char *oldpath, const char *newpath, bool use_winsym,
syscall_printf ("symlink (%s, %s)", oldpath, win32_path.get_win32 ());
- if (win32_path.is_auto_device ())
+ if ((!isdevice && win32_path.exists ())
+ || win32_path.is_auto_device ())
{
set_errno (EEXIST);
goto done;