summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc3
1 files changed, 2 insertions, 1 deletions
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;