mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
sftpfs: fix fingerprints copy for memory provider
This commit is contained in:
parent
a6985075b9
commit
72e3d464b8
1 changed files with 4 additions and 1 deletions
|
@ -881,7 +881,10 @@ func (u *User) getACopy() User {
|
|||
Prefix: u.FsConfig.SFTPConfig.Prefix,
|
||||
},
|
||||
}
|
||||
copy(fsConfig.SFTPConfig.Fingerprints, u.FsConfig.SFTPConfig.Fingerprints)
|
||||
if len(u.FsConfig.SFTPConfig.Fingerprints) > 0 {
|
||||
fsConfig.SFTPConfig.Fingerprints = make([]string, len(u.FsConfig.SFTPConfig.Fingerprints))
|
||||
copy(fsConfig.SFTPConfig.Fingerprints, u.FsConfig.SFTPConfig.Fingerprints)
|
||||
}
|
||||
|
||||
return User{
|
||||
ID: u.ID,
|
||||
|
|
Loading…
Reference in a new issue