mirror of https://github.com/schollz/croc.git
Fixed #431
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:
parent
7390e7ed45
commit
e981328e54
|
@ -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, "/")
|
||||
|
|
Loading…
Reference in New Issue