mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user