applyDeletedToLocal :: (MonadIO m, MonadBaseControl IO m) => FilePath -> File -> m Change
applyDeletedToLocal syncDir file = do
    res <- try $ liftIO $ deleteLocal syncDir (File.path file)
    case res of
        Right deletedFile -> return $ Deleted deletedFile
        Left e | isDoesNotExistError e -> liftIO (warningM "Sync.applyDeletedToLocal" (show e)) >> return (Deleted file)
        Left e -> throw e
applyDeletedToLocal :: (MonadIO m, MonadBaseControl IO m) => FilePath -> File -> m Change
applyDeletedToLocal syncDir file = do
    res <- try $ liftIO $ deleteLocal syncDir (File.path file)
    case res of
        Right deletedFile -> return $ Deleted deletedFile
        Left e | isDoesNotExistError e -> liftIO (warningM "Sync.applyDeletedToLocal" (show e)) >> return (Deleted file)
        Left e -> throw e
applyDeletedToLocal syncDir file = do
    res <- try $ liftIO $ deleteLocal syncDir (File.path file)
    case res of
        Right deletedFile -> return $ Deleted deletedFile
        Left e | isDoesNotExistError e -> liftIO (warningM "Sync.applyDeletedToLocal" (show e)) >> return (Deleted file)
        Left e -> throw e