From b521e0e0029de6d8971f4aa36a99d5d625b1d9bd Mon Sep 17 00:00:00 2001 From: Kenneth Loeffler Date: Fri, 26 Jan 2024 11:49:28 -0800 Subject: [PATCH] Break rbx_reflector file watcher receive loop after modify events (#384) On macOS, the file watcher emits a modify event after saving the defaults place in Roblox Studio, making it impossible to successfully use rbx_reflector. This PR fixes this by changing the event receive loop in rbx_reflector's defaults place command so that it also checks for modify events. --- rbx_reflector/src/cli/defaults_place.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rbx_reflector/src/cli/defaults_place.rs b/rbx_reflector/src/cli/defaults_place.rs index 86c63790b..7e0b7629b 100644 --- a/rbx_reflector/src/cli/defaults_place.rs +++ b/rbx_reflector/src/cli/defaults_place.rs @@ -89,7 +89,8 @@ fn save_place_in_studio(path: &PathBuf) -> anyhow::Result { println!("Please save the opened place in Roblox Studio (ctrl+s)."); loop { - if rx.recv()??.kind.is_create() { + let event = rx.recv()??; + if event.kind.is_create() || event.kind.is_modify() { break; } }