Skip to content

Commit 237106a

Browse files
author
alikhan.suleimen
committed
fix: no directories created
1 parent b1789f4 commit 237106a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/uploader/ftp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type FtpUploader struct {
2323

2424
func NewFtpUploader(ctx context.Context, authConfig config.AuthCredentials, connectionCount int) (*FtpUploader, error) {
2525
uploader := FtpUploader{
26+
authConfig: authConfig,
2627
directoriesMutex: sync.RWMutex{},
2728
allConnections: make([]*ftp.ServerConn, 0),
2829
connQueue: make(chan *ftp.ServerConn, connectionCount),
@@ -98,7 +99,7 @@ func (uploader *FtpUploader) createDirectoryIfNotExists(conn *ftp.ServerConn, up
9899
for i := range directories {
99100
remoteDir := filepath.Join(directories[:i+1]...)
100101
if uploader.directoryIsCreated(remoteDir) {
101-
return nil
102+
continue
102103
}
103104

104105
err := conn.MakeDir(remoteDir)

0 commit comments

Comments
 (0)