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)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-11-05 17:43:45 +00:00
parent 1b075023fa
commit 0f4c227c1f
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
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

View file

@ -306,7 +306,9 @@ update_etc_hosts (const char *hostname)
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');
}
}