Fixed #431 by removing the condition that requires the directory being
send to be located inside the current working directory.
This commit is contained in:
hamiecod 2021-12-26 14:26:05 +05:30
parent 7390e7ed45
commit e981328e54
1 changed files with 0 additions and 4 deletions

View File

@ -281,10 +281,6 @@ func (c *Client) sendCollectFiles(options TransferOptions) (err error) {
if err != nil {
return
}
if !strings.HasPrefix(folderName, curFolder) {
err = fmt.Errorf("remote directory must be relative to current")
return
}
c.FilesToTransfer[i].FolderRemote = strings.TrimPrefix(folderName, curFolder)
c.FilesToTransfer[i].FolderRemote = filepath.ToSlash(c.FilesToTransfer[i].FolderRemote)
c.FilesToTransfer[i].FolderRemote = strings.TrimPrefix(c.FilesToTransfer[i].FolderRemote, "/")