1 Commits

Author SHA1 Message Date
dependabot[bot]
650c117214 Bump coverallsapp/github-action from 2.3.0 to 2.3.4
Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.3.0 to 2.3.4.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](643bc377ff...cfd0633edb)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-25 15:18:43 +00:00
2 changed files with 2 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ jobs:
- name: Convert coverage to lcov - name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5 uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5
- name: Coveralls - name: Coveralls
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov path-to-lcov: coverage.lcov

21
ftp.go
View File

@@ -11,7 +11,6 @@ import (
"io" "io"
"net" "net"
"net/textproto" "net/textproto"
"regexp"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@@ -828,7 +827,7 @@ func (c *ServerConn) CurrentDir() (string, error) {
end := strings.LastIndex(msg, "\"") end := strings.LastIndex(msg, "\"")
if start == -1 || end == -1 { if start == -1 || end == -1 {
return "", errors.New("unsupported PWD response format") return "", errors.New("unsuported PWD response format")
} }
return msg[start+1 : end], nil return msg[start+1 : end], nil
@@ -1094,24 +1093,6 @@ func (c *ServerConn) Walk(root string) *Walker {
return w return w
} }
// Search returns all the directories matching the search pattern
func (c *ServerConn) Search(pattern string) ([]string, error) {
_, message, err := c.cmd(StatusCommandOK, "SITE SEARCH %s", pattern)
if err != nil {
return nil, err
}
msgs := make([]string, 0)
re := regexp.MustCompile(`^200- (?P<Path>.*) \(.*\).*$`)
for _, msg := range strings.Split(message, "\n") {
if re.MatchString(msg) {
msgs = append(msgs, re.ReplaceAllString(msg, "${Path}"))
}
}
return msgs, nil
}
// NoOp issues a NOOP FTP command. // NoOp issues a NOOP FTP command.
// NOOP has no effects and is usually used to prevent the remote FTP server to // NOOP has no effects and is usually used to prevent the remote FTP server to
// close the otherwise idle connection. // close the otherwise idle connection.