Open diocletiann opened 4 months ago
Looks like we're attempting to clear the the file before writing. This reproduces if the file is in a location that's owned by root but doesn't reproduce if the file is in a location owned by the user.
Looks like we're attempting to clear the the file before writing. This reproduces if the file is in a location that's owned by root but doesn't reproduce if the file is in a location owned by the user.
Well even in a location owned by the user, I tried open()
with a text file and it deleted the file before it could even be read.
Does that happen when you open it for reading with "r". I would expect that to happen when it's open for writing because the file is cleared out before writing happens….I believe that's how it works in Python as well.
"r" opens the file without data loss, sounds like an "rw" option is needed.
Bug description
I'm not sure why this is failing, mentioned it on Discord and was asked to open an issue:
This is the pipe:
Steps to reproduce
System information