Remove fd cache (ref #1308)

This commit is contained in:
Audrius Butkevicius
2015-01-28 14:32:59 +00:00
parent 8358fedaf4
commit 380d5dfa6d
7 changed files with 7 additions and 297 deletions

View File

@@ -755,7 +755,9 @@ func (m *Model) Request(deviceID protocol.DeviceID, folder, name string, offset
}
reader = strings.NewReader(target)
} else {
reader, err = os.Open(fn) // XXX: Inefficient, should cache fd?
// Cannot easily cache fd's because we might need to delete the file
// at any moment.
reader, err = os.Open(fn)
if err != nil {
return nil, err
}