mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
sysutils/sftp-backup : remove carriage return for windows users and possible excess line endings, closes https://github.com/opnsense/plugins/issues/4582
This commit is contained in:
parent
11bb18d97d
commit
00cb3e9dbe
1 changed files with 1 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ class Sftp extends Base implements IBackupProvider
|
|||
mkdir($confdir);
|
||||
}
|
||||
if (!is_file($identfile) || file_get_contents($identfile) != $this->model->privkey) {
|
||||
File::file_put_contents($identfile, $this->model->privkey, 0600);
|
||||
File::file_put_contents($identfile, trim(str_replace("\r", "", $this->model->privkey)) . "\n", 0600);
|
||||
}
|
||||
return $identfile;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue