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

Store names of content files #4

Closed
bouncepaw opened this issue Jun 19, 2020 · 2 comments
Closed

Store names of content files #4

bouncepaw opened this issue Jun 19, 2020 · 2 comments

Comments

@bouncepaw
Copy link
Owner

Currently content files are named like that: <n>.txt and <n>.bin. It was decided that it's not a good naming scheme.

If a revision uses the same binary data as a previous one, it is marked in struct Revision, but not in meta.json. It introduces this bug: if you change a hypha with binary data, the old picture is shown only until you reload the program.

What to do

  • Save files with numbers in their stem, but with extension matching their mime-type.
  • If it is hard to decide what extension to use, fall back to .txt and .bin.
  • Save filenames to meta.json
@bouncepaw
Copy link
Owner Author

This commit implemented the new naming scheme but it seems that not many mime-types are provided by stdlib's mime pkg.

TODO: support more mime-types.

@bouncepaw
Copy link
Owner Author

After I started transition to 0.7, the problem was resolved. It had been resolved even long before that tho.

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

No branches or pull requests

1 participant