add file deletion check

This commit is contained in:
IC Rainbow
2023-12-29 14:16:23 +02:00
parent dc8895c50c
commit 79c2e83fd0
2 changed files with 24 additions and 10 deletions

View File

@@ -795,7 +795,7 @@ processChatCommand' vr = \case
nf <- withStore $ \db -> getNoteFolder db user folderId
ci'@ChatItem {meta = CIMeta {itemId, itemTs}} <- createLocalChatItem user (CDLocalSnd nf) (CISndMsgContent mc) Nothing
ciFile_ <- forM file_ $ \cf@CryptoFile {filePath, cryptoArgs} -> do
fsFilePath <- toFSFilePath filePath -- XXX: only used for size?..
fsFilePath <- toFSFilePath filePath
fileSize <- liftIO $ CF.getFileContentsSize $ CryptoFile fsFilePath cryptoArgs
chunkSize <- asks $ fileChunkSize . config
withStore' $ \db -> do