mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-01 13:55:36 +00:00
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:
parent
1b075023fa
commit
0f4c227c1f
|
@ -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
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue