Skip to content

Commit e98a7be

Browse files
authored
Merge pull request pkg#289 from ncw/fix-288
Use Stat rather than Fstat in File.WriteTo to work around server bugs
2 parents 5bcd86d + 48c87f6 commit e98a7be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ func (f *File) Read(b []byte) (int, error) {
884884
// maximise throughput for transferring the entire file (especially
885885
// over high latency links).
886886
func (f *File) WriteTo(w io.Writer) (int64, error) {
887-
fi, err := f.Stat()
887+
fi, err := f.c.Stat(f.path)
888888
if err != nil {
889889
return 0, err
890890
}

0 commit comments

Comments
 (0)