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: delete the correct single_instance path + listen for Modify events too #38

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Dec 10, 2024

Important

Fixes file event handling by listening for Modify events and corrects the deletion path for single_instance.lock in lib.rs.

  • Behavior:
    • SpecificFileWatcher in lib.rs now listens for Modify events in addition to Create events.
    • Corrects file deletion path in run() in lib.rs to remove single_instance.lock file from the correct directory.
  • Misc:
    • Minor refactoring in SpecificFileWatcher to use pattern matching for event kinds.

This description was created by Ellipsis for bbf6bda. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to bbf6bda in 9 seconds

More details
  • Looked at 36 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src-tauri/src/lib.rs:317
  • Draft comment:
    Update the error message to specify the file being removed for clarity.
.remove_file(config_path.parent().unwrap().join("single_instance.lock")).expect("Failed to remove single_instance.lock file");
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR modifies the path used in remove_file to ensure the correct file is deleted. This change is correct, but the error message should be updated to reflect the specific file being removed.

Workflow ID: wflow_vWry5IEMrYpBoH0H


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@0xbrayo 0xbrayo merged commit c4e3e8c into ActivityWatch:master Dec 10, 2024
5 checks passed
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.

1 participant