Skip to content

Commit

Permalink
Return correct number of **objects** from pyopener_write
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillies committed Mar 4, 2024
1 parent 64ff632 commit e814d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fiona/_vsiopener.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ cdef size_t pyopener_write(void *pFile, void *pBuffer, size_t nSize, size_t nCou
num = file_obj.write(buff_view)
except TypeError:
num = file_obj.write(str(buff_view))
return 1 # <size_t>num
return <size_t>(num // nSize)


cdef int pyopener_flush(void *pFile) with gil:
Expand Down

0 comments on commit e814d03

Please sign in to comment.