import path from 'path' ; import fs from 'fs' ; import Debug from 'debug' ; import { DATA_PATH } from '../renderer/constants' ; const log = Debug ( 'DataMigration' ) ; migrateUserData ( ) ; function migrateUserData ( ) { try { const newPath = path . resolve ( DATA_PATH , 'pushpin-v10' ) ; fs . renameSync ( path . resolve ( DATA_PATH , '../Electron/pushpin-v10' ) , newPath ) ; log ( `User data migrated to ${ newPath }` ) ; } catch ( _err ) { log ( 'User data not migrated.' ) ; } }