OSDN Git Service

* path.cc (symlink_worker): Return EEXIST if newpath exists.
authorcorinna <corinna>
Wed, 19 Jul 2006 08:20:26 +0000 (08:20 +0000)
committercorinna <corinna>
Wed, 19 Jul 2006 08:20:26 +0000 (08:20 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index cb1a29a..777e1af 100644 (file)
@@ -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
index 1166916..f857f16 100644 (file)
@@ -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;