Skip to content

Commit

Permalink
default path supports configuration by host #137
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnywong committed Aug 25, 2024
1 parent 92d1967 commit 9ee1df2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tssh/trzsz.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,18 @@ func enableTrzsz(args *sshArgs, ss *sshClientSession) error {
})

// setup trzsz config
trzszFilter.SetDefaultUploadPath(userConfig.defaultUploadPath)
defaultUploadPath := getExOptionConfig(args, "DefaultUploadPath")
if defaultUploadPath == "" {
defaultUploadPath = userConfig.defaultUploadPath
}
trzszFilter.SetDefaultUploadPath(defaultUploadPath)

downloadPath := args.DownloadPath
if downloadPath == "" {
downloadPath = userConfig.defaultDownloadPath
downloadPath = getExOptionConfig(args, "DefaultDownloadPath")
if downloadPath == "" {
downloadPath = userConfig.defaultDownloadPath
}
}
trzszFilter.SetDefaultDownloadPath(downloadPath)

Expand Down

0 comments on commit 9ee1df2

Please sign in to comment.