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 crashes in status-bar plugin #1956

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdeaton
Copy link

@rdeaton rdeaton commented Nov 18, 2022

Turned a number of panics into logged errors that otherwise continue when interacting with the status-bar plugin's tips cache, and made writes to the cache atomic to avoid clobbering seen when running multiple zellij instances.

Fixes #1944

…ng from the cache. Make writing the cache an atomic operation, to avoid clobbering seen when running multiple instances of zellij
@rdeaton rdeaton temporarily deployed to cachix November 27, 2022 13:48 Inactive
@imsnif imsnif requested a review from jaeheonji December 15, 2022 08:47
file.write_all(json_cache.as_bytes())
.map_err(LocalCacheError::Io)?;
file.persist(self.path.as_path())
Copy link
Member

Choose a reason for hiding this comment

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

Hi @rdeaton, Thank you for contributing!

When I run your code in my environment, I keep getting the following error.

DEBUG  |/home/meow/Projects/zelli| 2022-12-20 21:27:49.223 [id: 1     ] Error flushing local cache to disk: Persist(PersistError { error: Os { code: 20, kind: AlreadyExists, message: "File exists" }, file: NamedTempFile("/tmp/.tmpKk1Sqm") }) 

Could you check re-again?

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.

Corrupted Statusbar tips cache causes panic
2 participants