mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-25 13:00:31 +01: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).