mirror of
https://github.com/FossifyOrg/Notes.git
synced 2026-06-11 18:19:15 -04:00
OutputStream for existing files with "content://" path needs to be opened in truncate mode, its description: "If the file already exists and is a regular file and is opened for writing, it will be truncated to length 0." Streams for files with "/storage" don't seem to be affected by this issue and don't need the truncate mode. See more at https://developer.android.com/reference/android/os/ParcelFileDescriptor#parseMode(java.lang.String).