case torrentToMetainfo torrentStr of
Left e -> logError e log
Right m -> do
- log "Input File OK"
- log $ "Downloading file : " ++ name (info m)
-
+ let p = name (info m)
+ log $ "Downloading file : " ++ p
+ -- if we had downloaded the file before (partly or completely)
+ -- then we should check the current directory for the existence
+ -- of the file and then update the map of each piece' availability.
+ -- This can be donw by reading each piece and verifying the checksum.
+ -- If the checksum does not match, we don't have that piece.
log $ "starting server"
(serverSock, (PortNumber portnum)) <- Server.start
log $ "server started on " ++ show portnum