There seems to be a issue writing to already existing files when the text to be written is smaller that the text that already exists on the file.
For example, with the mode currently in use w, let there be a file called foo.txt with the text foobar;
If we try to write to that file, the string foo, there wont be any changes in the file contents, the content will still be foobar.
Now with the mode wt, the file contents now change to be foo as expected.
This was only tested on android 12 but I believe this behavior happens for android 10+ has the following link states.
Hi,
There seems to be a issue writing to already existing files when the text to be written is smaller that the text that already exists on the file.
For example, with the mode currently in use
w
, let there be a file calledfoo.txt
with the textfoobar
; If we try to write to that file, the stringfoo
, there wont be any changes in the file contents, the content will still befoobar
.Now with the mode
wt
, the file contents now change to befoo
as expected.This was only tested on android 12 but I believe this behavior happens for android 10+ has the following link states.