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

EssenceFS does not save changes when writing/creating #36

Open
ModernMAK opened this issue Oct 10, 2023 · 0 comments
Open

EssenceFS does not save changes when writing/creating #36

ModernMAK opened this issue Oct 10, 2023 · 0 comments
Labels
bug Something isn't working SGA Relates to `Relic-Tool-SGA`

Comments

@ModernMAK
Copy link
Member

EssenceFS never calls a serializer to save changes to disk when in write or create mode.

This requires the user to manually save the filesystem using a serializer.

E.G.

with open_fs("sga://somepath.sga") as sga:
    ... # Some writes to the 'sga' object's filesystem
    with open(outfile, "wb") as sga_file:
        v2_serializer.write(sga_file, sga)

Preferably, this would be condensed to the snippet below, using PyFilesystem's __exit__() and close() methods.

with open_fs("sga://somepath.sga") as sga:
    ... # Some writes to the 'sga' object's filesystem

Unfortunately, we would need to cover the case where essence-fs is created manually, as there is no underlying file to write to

with EssenceFS() as sga:
    ... # Some writes to the 'sga' object's filesystem
@ModernMAK ModernMAK added bug Something isn't working SGA Relates to `Relic-Tool-SGA` labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SGA Relates to `Relic-Tool-SGA`
Projects
None yet
Development

No branches or pull requests

1 participant