mirror of
https://github.com/hectorm/hblock.git
synced 2026-04-21 22:46:32 +05:30
Handle files without a final newline
This commit is contained in:
parent
308785f3a0
commit
96d56829f1
8 changed files with 8 additions and 7 deletions
1
hblock
1
hblock
|
|
@ -582,6 +582,7 @@ main() {
|
|||
touch -- "${sourceDlFile:?}.part"
|
||||
{
|
||||
if fetchUrl "${url:?}" > "${sourceDlFile:?}.part"; then
|
||||
printf '\n' >> "${sourceDlFile:?}.part"
|
||||
mv -- "${sourceDlFile:?}.part" "${sourceDlFile:?}"
|
||||
else
|
||||
rm -f -- "${sourceDlFile:?}.part"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
single-entry-000.com
|
||||
entry-with-comment-000.com
|
||||
entry-with-comment-000.com
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
denied-entry-000.com
|
||||
denied-entry-001.com
|
||||
denied-entry-001.com
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
Footer line 1
|
||||
Footer line 2
|
||||
Footer line 2
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
Header line 1
|
||||
Header line 2
|
||||
Header line 2
|
||||
|
|
@ -12,4 +12,4 @@ jp
|
|||
東京.jp
|
||||
|
||||
香港
|
||||
網絡.香港
|
||||
網絡.香港
|
||||
|
|
@ -49,4 +49,4 @@ not-an-iP ENTry-With-pReFIx-009.coM
|
|||
eNTry-with-coMMeNt-000.COM# dUmMY cOMMENt
|
||||
entry-with-comment-001.CoM Entry-WITh-cOmMEnt-002.cOM # DuMmY CoMMenT
|
||||
0.0.0.0 ENTrY-wItH-COMMEnT-003.CoM ENTrY-wITH-cOmMEnt-004.cOm # DumMY coMmeNT
|
||||
#0.0.0.0 ENTRY-wiTH-ComMenT-005.Com
|
||||
#0.0.0.0 ENTRY-wiTH-ComMenT-005.Com
|
||||
|
|
@ -39,4 +39,4 @@ example-037.net
|
|||
example-038.xn--1lqs71d.jp
|
||||
example-039.org
|
||||
example-040.xn--od0alg.xn--j6w193g
|
||||
example-041.jp
|
||||
example-041.jp
|
||||
Loading…
Add table
Add a link
Reference in a new issue