*** a/src/port/exec.c
--- b/src/port/exec.c
***************
*** 263,269 **** resolve_symlinks(char *path)
--- 263,273 ----
  			fname = path;
  
  		if (lstat(fname, &buf) < 0 ||
+ #ifndef WIN32
  			!S_ISLNK(buf.st_mode))
+ #else
+ 			!pgwin32_is_junction(fname))
+ #endif					
  			break;
  
  		rllen = readlink(fname, link_buf, sizeof(link_buf));
