From a20861fa8eab7bb9ade76e7299a8b25a8a2cc554 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Sep 2020 16:12:21 -0700 Subject: [PATCH] Write newline when editing files using the text parser; closes pterodactyl/panel#2393 --- parser/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/parser.go b/parser/parser.go index 9e00597..aaf833f 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -415,7 +415,7 @@ func (f *ConfigurationFile) parseTextFile(path string) error { // If there was a replacement that occurred on this specific line, do a write to the file // immediately to write that modified content to the disk. if hasReplaced { - if _, err := file.WriteAt([]byte(t), int64(len(scanner.Bytes()))); err != nil { + if _, err := file.WriteAt([]byte(t+"\n"), int64(len(scanner.Bytes()))); err != nil { return err } }