diff lib/config_file.c @ 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 d553d14a2565
children 1808cebed602
line wrap: on
line diff
--- 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)
     {