1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-02 05:52:36 +02:00

(do_link): Perform S_ISLNK test only if lstat succeeded.

This commit is contained in:
Jim Meyering
1997-09-15 14:02:47 +00:00
parent 1822e3bd68
commit c2bbb8e875
+3 -2
View File
@@ -199,8 +199,9 @@ do_link (const char *source, const char *dest)
&& S_ISDIR (dest_stats.st_mode))
#ifdef S_ISLNK
|| (dereference_dest_dir_symlinks
&& (S_ISLNK (dest_stats.st_mode)
&& isdir (dest)))
&& (lstat_status == 0
&& S_ISLNK (dest_stats.st_mode)
&& isdir (dest)))
#endif
)
{