From 2e806fb2f3c0d507fb8b93af3a577673646a95e5 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Thu, 1 Jun 2000 04:20:05 -0700
Subject: [PATCH] [svn] Don't try to chmod() symlinks.

---
 src/ChangeLog | 5 +++++
 src/ftp.c     | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index a95781f3..7e39a580 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
+
+	* ftp.c (ftp_retrieve_list): Change permissions only on plain
+	files.
+
 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
 
 	* url.c (str_url): Print the port number only if it's different
diff --git a/src/ftp.c b/src/ftp.c
index ef611d32..cc2cff9b 100644
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1221,7 +1221,7 @@ Already have correct symlink %s -> %s\n\n"),
       else if (f->tstamp == -1)
 	logprintf (LOG_NOTQUIET, _("%s: corrupt time-stamp.\n"), u->local);
 
-      if (f->perms && dlthis)
+      if (f->perms && f->type == FT_PLAINFILE && dlthis)
 	chmod (u->local, f->perms);
       else
 	DEBUGP (("Unrecognized permissions for %s.\n", u->local));