mirror of
https://github.com/rclone/rclone.git
synced 2026-01-13 05:53:16 +00:00
Compare commits
2 Commits
fix-sftp-i
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e51a0599a0 | ||
|
|
530a901de3 |
@@ -898,7 +898,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
|
|||||||
|
|
||||||
resultchan := make(chan []*ftp.Entry, 1)
|
resultchan := make(chan []*ftp.Entry, 1)
|
||||||
errchan := make(chan error, 1)
|
errchan := make(chan error, 1)
|
||||||
go func() {
|
go func(c *ftp.ServerConn) {
|
||||||
result, err := c.List(f.dirFromStandardPath(path.Join(f.root, dir)))
|
result, err := c.List(f.dirFromStandardPath(path.Join(f.root, dir)))
|
||||||
f.putFtpConnection(&c, err)
|
f.putFtpConnection(&c, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -906,7 +906,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resultchan <- result
|
resultchan <- result
|
||||||
}()
|
}(c)
|
||||||
|
|
||||||
// Wait for List for up to Timeout seconds
|
// Wait for List for up to Timeout seconds
|
||||||
timer := time.NewTimer(f.ci.TimeoutOrInfinite())
|
timer := time.NewTimer(f.ci.TimeoutOrInfinite())
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ type StateChangeConf struct {
|
|||||||
func (conf *StateChangeConf) WaitForStateContext(ctx context.Context, entityType string) (any, error) {
|
func (conf *StateChangeConf) WaitForStateContext(ctx context.Context, entityType string) (any, error) {
|
||||||
// fs.Debugf(entityType, "Waiting for state to become: %s", conf.Target)
|
// fs.Debugf(entityType, "Waiting for state to become: %s", conf.Target)
|
||||||
|
|
||||||
notfoundTick := 0
|
|
||||||
targetOccurrence := 0
|
|
||||||
|
|
||||||
// Set a default for times to check for not found
|
// Set a default for times to check for not found
|
||||||
if conf.NotFoundChecks == 0 {
|
if conf.NotFoundChecks == 0 {
|
||||||
conf.NotFoundChecks = 20
|
conf.NotFoundChecks = 20
|
||||||
@@ -84,9 +81,11 @@ func (conf *StateChangeConf) WaitForStateContext(ctx context.Context, entityType
|
|||||||
// cancellation channel for the refresh loop
|
// cancellation channel for the refresh loop
|
||||||
cancelCh := make(chan struct{})
|
cancelCh := make(chan struct{})
|
||||||
|
|
||||||
result := Result{}
|
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
notfoundTick := 0
|
||||||
|
targetOccurrence := 0
|
||||||
|
result := Result{}
|
||||||
|
|
||||||
defer close(resCh)
|
defer close(resCh)
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ func (c *conn) handleChannel(newChannel ssh.NewChannel) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fs.Debugf(c.what, " - accepted: %v\n", ok)
|
fs.Debugf(c.what, " - accepted: %v\n", ok)
|
||||||
err = req.Reply(ok, reply)
|
err := req.Reply(ok, reply)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Errorf(c.what, "Failed to Reply to request: %v", err)
|
fs.Errorf(c.what, "Failed to Reply to request: %v", err)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ func startSystemdLog(handler *OutputHandler) bool {
|
|||||||
handler.clearFormatFlags(logFormatDate | logFormatTime | logFormatMicroseconds | logFormatUTC | logFormatLongFile | logFormatShortFile | logFormatPid)
|
handler.clearFormatFlags(logFormatDate | logFormatTime | logFormatMicroseconds | logFormatUTC | logFormatLongFile | logFormatShortFile | logFormatPid)
|
||||||
handler.setFormatFlags(logFormatNoLevel)
|
handler.setFormatFlags(logFormatNoLevel)
|
||||||
handler.SetOutput(func(level slog.Level, text string) {
|
handler.SetOutput(func(level slog.Level, text string) {
|
||||||
_ = journal.Print(slogLevelToSystemdPriority(level), "%-6s: %s\n", level, text)
|
_ = journal.Print(slogLevelToSystemdPriority(level), "%-6s: %s", level, text)
|
||||||
})
|
})
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user