Write newline when editing files using the text parser; closes pterodactyl/panel#2393

This commit is contained in:
Dane Everitt 2020-09-26 16:12:21 -07:00
parent 62d0c7fa24
commit a20861fa8e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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
}
}