Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ func fixPathForm(last string, file string) string {
return file
}

if strings.Contains(last, "..") {
return fixDirPath(file)
}

abs, err := filepath.Abs(file)
if err != nil {
return file
Expand Down Expand Up @@ -44,3 +48,4 @@ func fixDirPath(path string) string {
}
return path
}