diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs index 23ed3dbf89..7692abeb51 100644 --- a/Remote/Helper/Chunked.hs +++ b/Remote/Helper/Chunked.hs @@ -8,6 +8,7 @@ module Remote.Helper.Chunked ( ChunkSize, ChunkConfig(..), + noChunks, describeChunkConfig, getChunkConfig, storeChunks, diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 60bf123a5d..42827e5f73 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -162,18 +162,21 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp (\_ -> return False) , removeKey = \k -> cip >>= removeKeyGen k , checkPresent = \k -> cip >>= checkPresentGen k - , cost = maybe - (cost baser) - (const $ cost baser + encryptedRemoteCostAdj) - (extractCipher c) + , cost = if isencrypted + then cost baser + encryptedRemoteCostAdj + else cost baser , getInfo = do l <- getInfo baser return $ l ++ [ ("encryption", describeEncryption c) , ("chunking", describeChunkConfig (chunkConfig cfg)) ] + , whereisKey = if noChunks (chunkConfig cfg) && not isencrypted + then whereisKey baser + else Nothing } cip = cipherKey c + isencrypted = isJust (extractCipher c) gpgopts = getGpgEncParams encr safely a = catchNonAsync a (\e -> warning (show e) >> return False)