Hacker News new | ask | show | jobs
by zandorg 6240 days ago
A caveat to TinyCDB in Windows:

Don't forget (In Windows) to specify O_BINARY eg:

  O_RDONLY |O_BINARY
Also the case in Berkeley DB 1.86.

Otherwise it opens a file in ASCII mode, when Windows writes \r\n when it reads in \n... , and dies after just a few records.

1 comments

I have a Lua binding to tinycdb. I hadn't considered Windows compatibility and this bug exists in my code. I've just committed a fix, thanks.