storage/file.go | 4 ++-- diff --git a/storage/file.go b/storage/file.go index 66b0debfa47c4a2e0a5da0898fa509e1ac36d9aa..a4c2901577b5a3baed02c4760862f13381657d41 100644 --- a/storage/file.go +++ b/storage/file.go @@ -40,14 +40,14 @@ return newFileWithCustomPathMakerAndCompletion(baseDir, nil, completion) } // File storage with data partitioned by infohash. -func NewFileByInfoHash(baseDir string) ClientImpl { +func NewFileByInfoHash(baseDir string) ClientImplCloser { return NewFileWithCustomPathMaker(baseDir, infoHashPathMaker) } // Allows passing a function to determine the path for storing torrent data. The function is // responsible for sanitizing the info if it uses some part of it (for example sanitizing // info.Name). -func NewFileWithCustomPathMaker(baseDir string, pathMaker func(baseDir string, info *metainfo.Info, infoHash metainfo.Hash) string) ClientImpl { +func NewFileWithCustomPathMaker(baseDir string, pathMaker func(baseDir string, info *metainfo.Info, infoHash metainfo.Hash) string) ClientImplCloser { return newFileWithCustomPathMakerAndCompletion(baseDir, pathMaker, pieceCompletionForDir(baseDir)) }