Commit be128fd7 authored by Eric's avatar Eric

[update] fix sftp bug

parent 7e4e1989
...@@ -54,11 +54,11 @@ func (fs *userSftpRequests) initial() { ...@@ -54,11 +54,11 @@ func (fs *userSftpRequests) initial() {
fs.loadAssets() fs.loadAssets()
fs.hosts = make(map[string]*HostNameDir) fs.hosts = make(map[string]*HostNameDir)
fs.rootPath = config.GetConf().SftpRoot fs.rootPath = config.GetConf().SftpRoot
for _, item := range fs.assets { for i, item := range fs.assets {
tmpDir := &HostNameDir{ tmpDir := &HostNameDir{
rootPath: fs.rootPath, rootPath: fs.rootPath,
hostname: item.Hostname, hostname: item.Hostname,
asset: &item, asset: &fs.assets[i],
time: time.Now().UTC(), time: time.Now().UTC(),
} }
fs.hosts[item.Hostname] = tmpDir fs.hosts[item.Hostname] = tmpDir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment