changeset 854:2c94567f9a53

2006-11-16 Brian Masney <masneyb@gftp.org> * lib/config_file.c (write_comment) - added patch that fixes writing the comments to the config file. In some cases, an extra # was placed at the beginning of a line. It could cause some settings to be not processed. (closes #339029) (from Morita Sho <bugreport_01@morita-inc.co.jp>)
author masneyb
date Fri, 17 Nov 2006 02:50:34 +0000
parents e30271d47353
children 30eaf54a63f7
files ChangeLog lib/config_file.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 17 02:45:06 2006 +0000
+++ b/ChangeLog	Fri Nov 17 02:50:34 2006 +0000
@@ -1,4 +1,10 @@
 2006-11-16 Brian Masney <masneyb@gftp.org>
+	* lib/config_file.c (write_comment) - added patch that fixes writing
+	the comments to the config file. In some cases, an extra # was placed
+	at the beginning of a line. It could cause some settings to be not 
+	processed. (closes #339029)
+	(from Morita Sho <bugreport_01@morita-inc.co.jp>)
+
 	* docs/gftp-faq.sgml - added FAQ entry on how to transfer HTML files in
 	binary mode using the FTP protocol.
 
@@ -3729,7 +3735,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.502 2006/11/17 02:45:03 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.503 2006/11/17 02:50:32 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/config_file.c	Fri Nov 17 02:45:06 2006 +0000
+++ b/lib/config_file.c	Fri Nov 17 02:50:34 2006 +0000
@@ -705,14 +705,14 @@
 	       endpos++);
 	}
       fwrite (pos, 1, endpos - pos, fd);
-      fwrite ("\n# ", 1, 3, fd);
+      fwrite ("\n", 1, 1, fd);
       if (*endpos == '\0')
 	{
 	  pos = endpos;
 	  break;
 	}
-      else
-	pos = endpos + 1;
+      pos = endpos + 1;
+      fwrite ("# ", 1, 2, fd);
     }
   if (strlen (pos) > 1)
     {