Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-platform incompatibility with Storage Emulator exports #4411

Merged
merged 7 commits into from Apr 8, 2022

Conversation

tohhsinpei
Copy link
Member

@tohhsinpei tohhsinpei commented Apr 6, 2022

Description

This PR fixes #4322 (comment), hopefully the last follow up to #3647. The Storage emulator is unable to import data previously exported on a different platform because we didn't account for different file path formats (e.g. \ delimiter on Windows but / on Linux) when flattening the directory structure.

Note re: the fix implemented here: ideally I would store and export everything in POSIX file format, then do the obvious replacement when importing. But I don't think that's a good idea for backwards compatibility reasons. Lmk if you have thoughts.

Scenarios Tested

Added integration test to verify that emulator is able to import data previously exported on Windows.

CHANGELOG.md Show resolved Hide resolved
src/emulator/storage/files.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@tonyjhuang tonyjhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix! LGTM outside of a test case

@tohhsinpei tohhsinpei enabled auto-merge (squash) April 8, 2022 16:48
@tohhsinpei tohhsinpei merged commit 3d43bae into master Apr 8, 2022
@tohhsinpei tohhsinpei deleted the hsinpei/cross-platform-import-export branch April 8, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage emulator import/export data error
2 participants