X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/9f89cd9fbbcec9f7f42c87ee0adc21427aab9f1c..adcd4879d93e6d298ff2644178bc47c1eb8d1da4:/hotline/file_transfer.go?ds=inline diff --git a/hotline/file_transfer.go b/hotline/file_transfer.go index 806466b..847c7fe 100644 --- a/hotline/file_transfer.go +++ b/hotline/file_transfer.go @@ -87,6 +87,7 @@ func (ftm *MemFileTransferMgr) Delete(id FileTransferID) { } type FileTransfer struct { + FileRoot string FileName []byte FilePath []byte RefNum [4]byte @@ -116,9 +117,10 @@ func (wc *WriteCounter) Write(p []byte) (int, error) { return n, nil } -func (cc *ClientConn) NewFileTransfer(transferType FileTransferType, fileName, filePath, size []byte) *FileTransfer { +func (cc *ClientConn) NewFileTransfer(transferType FileTransferType, fileroot string, fileName, filePath, size []byte) *FileTransfer { ft := &FileTransfer{ FileName: fileName, + FileRoot: fileroot, FilePath: filePath, Type: transferType, TransferSize: size, @@ -419,7 +421,6 @@ func DownloadFolderHandler(rwc io.ReadWriter, fullPath string, fileTransfer *Fil } subPath := path[basePathLen+1:] - rLogger.Debug("Sending fileheader", "i", i, "path", path, "fullFilePath", fullPath, "subPath", subPath, "IsDir", info.IsDir()) if i == 1 { return nil @@ -435,8 +436,6 @@ func DownloadFolderHandler(rwc io.ReadWriter, fullPath string, fileTransfer *Fil return err } - rLogger.Debug("Client folder download action", "action", fmt.Sprintf("%X", nextAction[0:2])) - var dataOffset int64 switch nextAction[1] {