-
Notifications
You must be signed in to change notification settings - Fork 55
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/1896/file modifications #1928
Conversation
4ca36fd
to
5ab728b
Compare
Robot Results
Passed Tests
|
@jmshark #1875 has been merged now, so please rebase/resolve conflicts. |
5ab728b
to
f3e8c8b
Compare
Done |
tests/RobotFramework/tests/cumulocity/configuration/configuration_operation.robot
Outdated
Show resolved
Hide resolved
f3e8c8b
to
6edbb09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Nice fix and simplification.
pub fn add_watcher( | ||
&mut self, | ||
dir_path: &Path, | ||
file: Option<String>, | ||
events: &[FsEvent], | ||
) -> Result<(), NotifyStreamError> { | ||
/// Will return an error if you try to watch a file/directory which doesn't exist | ||
pub fn add_watcher(&mut self, dir_path: &Path) -> Result<(), NotifyStreamError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the list of watch events is a nice simplification. The caller might receive more messages than expected but it far simpler to do the filtering there.
6edbb09
to
25bb89f
Compare
Proposed changes
Fix for 1896 sed creates a temp file where the edits are made then moves the file to the final destination. Moving a file in the same directory generates various EventKind::Modify where the modification kind is Name these events were being dropped by
crates\common\tedge_utils\src\notify.rs
which is why it fails for these cases.In addition to capturing these events I've also removed some dead code.
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments