We want the customer to experience that they are able to use the standalone application just like they've done before. Therefore, the persistent store should automatically be migrated to the new location.
Notice that running copyOldElectronStore() will not pause the installer to launch the Bluetooth Low Energy Application, and I'm therefore unsure if this is a solid implementation of the migration.
The problem would occur if the application is able to create the pc-nrfconnect-ble.json before the function tests if it exists, and would then not copy the old json file, even though the new one is ~empty.
A possible solution would be to also check the content of the new pc-nrfconnect-ble.json, or just the content length. But if the current implementation is sufficient, it's probably ok left as is.
We want the customer to experience that they are able to use the standalone application just like they've done before. Therefore, the persistent store should automatically be migrated to the new location.
Notice that running
copyOldElectronStore()
will not pause the installer to launch the Bluetooth Low Energy Application, and I'm therefore unsure if this is a solid implementation of the migration. The problem would occur if the application is able to create thepc-nrfconnect-ble.json
before the function tests if it exists, and would then not copy the old json file, even though the new one is ~empty.A possible solution would be to also check the content of the new
pc-nrfconnect-ble.json
, or just the content length. But if the current implementation is sufficient, it's probably ok left as is.Tested locally on Windows and it worked fine.