NordicSemiconductor / pc-nrfconnect-ble

Bluetooth low energy app for nRF Connect for Desktop
Other
151 stars 43 forks source link

Copy old persistent electron on initial standalone install #256

Closed aadnekar closed 2 years ago

aadnekar commented 2 years ago

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.

Tested locally on Windows and it worked fine.

aadnekar commented 2 years ago

Implemented in different repository.