Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fileOrNothing should check fileContent isn't empty #1877

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

amitaibu
Copy link
Collaborator

Right now we return a Just file, even when there's no file.

This is similar to the check we already have here

Just fileInfo | not (LBS.null (fileInfo.fileContent)) -> do

Copy link
Member

@mpscholten mpscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the fileOrNothing function now already checks for emptiness, we can remove the emptiness checks from the call-sites of fileOrNothing. E.g. in uploadToStorageWithOptions, we can now remove the | not (LBS.null (fileInfo.fileContent)) condition, as fileOrNothing already checked that

@amitaibu amitaibu requested a review from mpscholten December 30, 2023 14:38
@mpscholten mpscholten merged commit 936ec85 into master Jan 1, 2024
@mpscholten mpscholten deleted the fileOrNothing-check-file branch January 1, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants