CryptSky
CryptSky copied to clipboard
read and write issues in windows
This is a reference to the comments made on #7. The windows implementation on python seems to struggle with reading and writing to a file without seeks and flushes separating them. While I was seeking between the read() and write(), I did not between the write() and the next blocks read(). One hacky way to solve this is a seek. Any seek, even if it does nothing, like f.seek(f.tell()) will fix it. Or the more proper way (which will come in a commit fixing this issue soon) is f.flush(). I just wanted to document it.
This is a reference to the comments made on #7. The windows implementation on python seems to struggle with reading and writing to a file without seeks and flushes separating them. While I was seeking between the read() and write(), I did not between the write() and the next blocks read(). One hacky way to solve this is a seek. Any seek, even if it does nothing, like
f.seek(f.tell())will fix it. Or the more proper way (which will come in a commit fixing this issue soon) isf.flush(). I just wanted to document it.
i think "rb+" mode can help you
i think
"rb+"mode can help you
yea. i have played with this before in other projects and if memory serves, there are platform inconsistencies in how 'b+' is handled. but I may be wrong, that could be fixed, or just not applicable here. Either way, i may get around to fixing this, but this project is not in active development currently.
But if you would like to fix and test it, i would accept a pull request.