Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Apr 8, 2025

perf: Sftp path

@fit2bot fit2bot requested a review from a team April 8, 2025 11:18
@@ -552,7 +552,7 @@ func (ad *AssetDir) checkExpired() {

func (ad *AssetDir) GetRealPath(sftpSess *SftpSession, path string) string {
realPath := filepath.Join(sftpSess.rootDirPath, strings.TrimPrefix(path, "/"))
if ad.isFromWebTerminal && path != "" {
if ad.isFromWebTerminal && path != "" && strings.HasPrefix(path, sftpSess.rootDirPath) {
return path
}
return realPath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code snippet isn't formatted to be analyzed like it would be for a regular document. It seems too fragmented and lacks context for meaningful analysis. Please ensure you have the complete code that I can analyze for discrepancies between two versions, potential issues, optimizations, or other relevant metrics so I could provide precise insights.

Copy link

sonarqubecloud bot commented Apr 8, 2025

@feng626 feng626 merged commit d2fb669 into dev Apr 8, 2025
6 of 7 checks passed
@feng626 feng626 deleted the pr@dev@sftp branch April 8, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants