do not remove the old file structure

pull/1/head
yann300 5 years ago
parent 89c9cf28c3
commit a892ed0ad0
  1. 7
      src/migrateFileSystem.js

@ -6,13 +6,16 @@ import { Storage } from 'remix-lib'
*/
export default (fileProvider) => {
const fileStorage = new Storage('sol:')
if (fileStorage.keys().length === 0) return
const flag = 'status'
const fileStorageBrowserFS = new Storage('remix_browserFS_migration:')
if (fileStorageBrowserFS.get(flag) === 'done') return
fileStorage.keys().forEach((path) => {
if (path !== '.remix.config') {
const content = fileStorage.get(path)
fileProvider.set(path, content)
fileStorage.remove(path)
// fileStorage.remove(path) we don't want to remove it as we are still supporting the old version
console.log('file migrated', path)
}
})
fileStorageBrowserFS.set(flag, 'done')
}

Loading…
Cancel
Save