(but preserve behavior of uploadTree)
If uploadFile is explicitly called for a file, it seems to make sense to upload it, even if empty (or try and error if it doesn't exist). This check seems like something that was meant for the uploadTree logic.
Fixes https://pagure.io/koji/issue/4094
The risk here is that this check could have been masking error conditions. It doesn't make sense to call uploadFile unless the file should be uploaded, but it's possible that something in the code could be relying on this.
I was thinking about adding some flag (upload_empty_file=True) but it could be added in case anything really wants to use such behaviour. So, +1 now.
upload_empty_file=True
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
Metadata Update from @relias-redhat: - Pull-request tagged with: testing-done
Commit 2c6dba34 fixes this pull-request
Pull-Request has been merged by tkopecek
(but preserve behavior of uploadTree)