* src/NetworkManagerPolicy.c
- (update_etc_hosts): only add newline if not the last line of the file
(Jonathan Miner)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4268
4912f4e0-d625-0410-9fb7-
b9a5a253dbdc
+2008-11-05 Dan Williams <dcbw@redhat.com>
+
+ * src/NetworkManagerPolicy.c
+ - (update_etc_hosts): only add newline if not the last line of the file
+ (Jonathan Miner)
+
2008-11-05 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-dhclient.c
if (add_line) {
g_string_append (new_contents, *line);
- g_string_append_c (new_contents, '\n');
+ /* Only append the new line if this isn't the last line in the file */
+ if (*(line+1))
+ g_string_append_c (new_contents, '\n');
}
}