appml / neutrinote

neutriNote - the original extensible Markdown + Math note app. Non-commerical. No lock-ins. Only 3 MB footprint & highly optimized. Designed for plaintext purists.
GNU General Public License v3.0
339 stars 23 forks source link

Upon creating new local repository, all files deleted #14

Open rancidfrog opened 2 years ago

rancidfrog commented 2 years ago

I restored app using oandbackupx due to phone failure. When I created local repository folder, app deleted all notes that were available on app. Since folder was empty.

App should first confirm with user before deleting all notes Instead app should have asked whether to create the files to sync folder with app or delete all notes, which makes more sense

rancidfrog commented 2 years ago

So, I restored app data, but I removed folder to avoid note deletions.

How to solve 'invalid local storage path'?

In settings, when I select "Local recovery path", the old non existent path is displayed on toast, there is no way to change it:

appml commented 2 years ago

I restored app using oandbackupx due to phone failure. When I created local repository folder, app deleted all notes that were available on app. Since folder was empty.

App should first confirm with user before deleting all notes Instead app should have asked whether to create the files to sync folder with app or delete all notes, which makes more sense

The local repo algorithm as it is now makes no assumption whether file disappearance is due to deletion. So the general advice is to enable backup (or mirror if you are using Android 9+) in order to persist your data across install / uninstall / hardware failures.

There is also an option to activate a trash bin folder with this flag:

com.appmindlab.nano.pref_keep_deleted_copies

Regarding the missing repo path, which Android version are you using? For Android 10 or above, if you pick Default Folder when you first set up the app, the path will go under Android/data/com.appmindlab.nano/files

rancidfrog commented 2 years ago

I restored app. So it had older local repository, which can not be changed as far as I can tell. So, The only way is to backup the notes and uninstall app. Then, reinstall and select default repository? But, If some problem occurs, there is no other way to solve issue if app has more updated notes than mirror or backup?

Is there no way of adding a popup when sync error detected. App already detects issue, but deletes all notes instead of resyncing folder. Should the app not ask if you want to sync notes to empty folder instead of deleting all notes on app? This case should be handled appropriately. At least ask user to back up notes before deleting them.

appml commented 2 years ago

I restored app. So it had older local repository, which can not be changed as far as I can tell. So, The only way is to backup the notes and uninstall app. Then, reinstall and select default repository? But, If some problem occurs, there is no other way to solve issue if app has more updated notes than mirror or backup?

Is there no way of adding a popup when sync error detected. App already detects issue, but deletes all notes instead of resyncing folder. Should the app not ask if you want to sync notes to empty folder instead of deleting all notes on app? This case should be handled appropriately. At least ask user to back up notes before deleting them.


The app treats its repo content and internal storage unlike other apps. The internal storage is more a search engine (like a database) and cache of the notes inside the repo. So when the repo folder is modified, other components can only reflect the change.

Mirror is in sync with local repo nearly real time, so once populated the data is very much in sync. Best to keep the mirror on a different medium (such as the sd card of your device, or some other locations).

Please feel free to contribute to the project if you have a more all encompassing idea. The idea behind the app may have grown a little more than a solo developer can handle :-)

rancidfrog commented 2 years ago

@appml I guess mirror is the option I am looking for. Will app still make daily backups if there is a mirror folder? Or do I have to manually change: com.appmindlab.nano.pref_incremental_backup|true In ~neutrinote_settings_data.txt

And is there a way to reset or change local repo? I did not find any link to path in ~ files

As local repo points to a folder that does not exist but still app has notes, which is contrary to the cache and search you described, since they only exist at the moment in internal storage. And in settings when I click on local repo it just toasts the wrong path with no option to select folder or change folder

Thank you for your time

appml commented 2 years ago

@appml I guess mirror is the option I am looking for. Will app still make daily backups if there is a mirror folder? Or do I have to manually change: com.appmindlab.nano.pref_incremental_backup|true In ~neutrinote_settings_data.txt

@rancidfrog Just by toggling Auto Backup under settings should activate daily backups, without needing to manually flipping the flag's true / false value. One caveat is that either newer Android versions (10 or above) or manufacturer specific ROMs are getting extremely aggressive in stopping the backup process halfway to conserve battery. One might want to turn off all battery optimization / background process prevention (however the steps are highly dependent on specific ROMs and can be a bit trial and error) or simply go with 3rd party folder backup apps.

And is there a way to reset or change local repo? I did not find any link to path in ~ files

As local repo points to a folder that does not exist but still app has notes, which is contrary to the cache and search you described, since they only exist at the moment in internal storage. And in settings when I click on local repo it just toasts the wrong path with no option to select folder or change folder

Sounds like the folder existed since earlier versions of Android? The app could still be holding onto an old handle of the repo. But I would not count on the content continues to persist beside those in the mirror. There is not a simple way to change the repo path once set in order to respect Android's new lockdown of folder path. The only option might be to backup the mirror ➡️ then clear the app's data ➡️ redo setting up the app ➡️ once mirror is detected, tap option menu ➡️ MIRROR ➡️ PULL FROM MIRROR.

Thank you for your time

Glad to help.