summaryrefslogtreecommitdiff
path: root/src/System/Torrent/Storage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/System/Torrent/Storage.hs')
-rw-r--r--src/System/Torrent/Storage.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs
index 6dda07e1..5315d9dc 100644
--- a/src/System/Torrent/Storage.hs
+++ b/src/System/Torrent/Storage.hs
@@ -90,7 +90,9 @@ data Storage = Storage
90-- * when seeding, validation 'ReadOnly' mode. 90-- * when seeding, validation 'ReadOnly' mode.
91-- 91--
92open :: Mode -> PieceSize -> FileLayout FileSize -> IO Storage 92open :: Mode -> PieceSize -> FileLayout FileSize -> IO Storage
93open mode s l = Storage mode s <$> mmapFiles mode l 93open mode s l
94 | s <= 0 = throwIO (InvalidSize s)
95 | otherwise = Storage mode s <$> mmapFiles mode l
94 96
95-- | Unmaps all files forcefully. It is recommended but not required. 97-- | Unmaps all files forcefully. It is recommended but not required.
96close :: Storage -> IO () 98close :: Storage -> IO ()