Skip to content

Commit

Permalink
cmd/sync: fix sync cmd with sftp:// (#4291)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Dec 27, 2023
1 parent b95cf4c commit 4f4aca7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ func extractToken(uri string) (string, string) {
}

func createSyncStorage(uri string, conf *sync.Config) (object.ObjectStorage, error) {
// nolint:staticcheck
uri = strings.TrimLeft(uri, "sftp://")
if !strings.Contains(uri, "://") {
if isFilePath(uri) {
absPath, err := filepath.Abs(uri)
Expand Down

0 comments on commit 4f4aca7

Please sign in to comment.