federicoiosue / Omni-Notes

Open source note-taking application for Android
https://omninotes.app
GNU General Public License v3.0
2.68k stars 1.11k forks source link

Replace attachments' full path with base file name #796

Open federicoiosue opened 3 years ago

federicoiosue commented 3 years ago

Remember this horrible fact: switching from Play Store to Alpha version broke all attachments due to the fact that in JSON backup files the path was stored as follows:

"uriPath":"file:///storage/emulated/0/Android/data/it.feio.android.omninotes/

while in Alpha version (to keep it completely separated from stable version) they're typically stored into

"uriPath":"file:///storage/emulated/0/Android/data/it.feio.android.omninotes.alpha/

So, keeping just file name would lighten database and backups and avoid this issue. Full paths should be rebuilt on occurrence.

federicoiosue commented 3 years ago

Also double check backup processing behavior for missing files case.