Skip to content

Fix usage of ContentResolver.openOutputStream()

cketti requested to merge cketti/briar:fix_openOutputStream into master

When writing to an existing file via the OutputStream returned by ContentResolver.openOutputStream(Uri), data is only overwritten, but the file isn't truncated if less data is written than already present in the file. This can lead to broken files.

This code in HotspotViewModel already does the right thing 👍

https://code.briarproject.org/briar/briar/-/blob/a14ee55f12672bc4b8555750a03d9b9666385879/briar-android/src/main/java/org/briarproject/briar/android/hotspot/HotspotViewModel.java#L173-174

Merge request reports