summaryrefslogtreecommitdiff
path: root/Logs/Transfer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-02 16:06:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-02 16:17:06 -0400
commit4845b59413e5ae70cd6b78035fbae93e9cd845de (patch)
treee8b71b410fdaac24d0209174dd4c960ebd931d13 /Logs/Transfer.hs
parent224dac374e685b93eb32f799ad37cedb5b372e3b (diff)
startedTime needs to be a Maybe to handle transfers that have not started yet
This changes the file format.
Diffstat (limited to 'Logs/Transfer.hs')
-rw-r--r--Logs/Transfer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs
index dc9283306..f808cb6a4 100644
--- a/Logs/Transfer.hs
+++ b/Logs/Transfer.hs
@@ -34,7 +34,7 @@ data Transfer = Transfer
- of some repository, that was acted on to initiate the transfer.
-}
data TransferInfo = TransferInfo
- { startedTime :: UTCTime
+ { startedTime :: Maybe UTCTime
, transferPid :: Maybe ProcessID
, transferThread :: Maybe ThreadId
, bytesComplete :: Maybe Integer
@@ -76,7 +76,7 @@ transfer t file a = do
createAnnexDirectory $ takeDirectory tfile
mode <- annexFileMode
info <- liftIO $ TransferInfo
- <$> getCurrentTime
+ <$> (Just <$> getCurrentTime)
<*> pure Nothing -- pid not stored in file, so omitted for speed
<*> pure Nothing -- threadid not stored in file, so omitted for speed
<*> pure Nothing -- not 0; transfer may be resuming