backup folder conflict with multiple instances
The plugin does not properly handle the backup folder when the app is used with the multiple instances feature. In fact, the second instance of the app creates a new profile space, where the first one is named "default" as the one in the main instance. The only difference, from what I can tell, is that in the profile.json the profiles in the second instance contain a field "altInstanceId" (it's value in my case is "alt1")
Thus, when enabling the backup plugin if it writes in the same folder of the main app, it overrides the "default" profile (and potentially additional profiles if their id collide).
A potential solution is that the plugin creates the subfolder by appending to its name "JoplinBackup" the field "altInstanceId" if present. Thus, in case one uses only the main app, it's backup folder is not affected by this fix.
- The path to the user profile for the backup is set by Joplin, not the plugin
- Set up different backup locations in the configuration
@JackGruber The path yes, but the subfolder it is set by the plugin (see https://github.com/search?q=repo%3AJackGruber%2Fjoplin-plugin-backup+joplinbackup&type=code) and potentially it may be made aware of the fact that it is a second app instance by reading the user profile "altInstanceId" in order to prevent conflicts.
A layman user would not be able to spot this bug until he/she tries to recover the data from a backup.