Cargo.lock 🔗
@@ -6270,6 +6270,7 @@ dependencies = [
"bitflags 2.9.0",
"core-foundation 0.10.0",
"fsevent-sys 3.1.0",
+ "log",
"parking_lot",
"tempfile",
"workspace-hack",
Lukas Wirth created
Fixes ZED-1T
Release Notes:
- Fixed a segmentation fault on macOS fervent stream creation
Cargo.lock | 1 +
crates/fsevent/Cargo.toml | 1 +
crates/fsevent/src/fsevent.rs | 12 ++++++++----
3 files changed, 10 insertions(+), 4 deletions(-)
@@ -6270,6 +6270,7 @@ dependencies = [
"bitflags 2.9.0",
"core-foundation 0.10.0",
"fsevent-sys 3.1.0",
+ "log",
"parking_lot",
"tempfile",
"workspace-hack",
@@ -15,6 +15,7 @@ doctest = false
[dependencies]
bitflags.workspace = true
parking_lot.workspace = true
+log.workspace = true
workspace-hack.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
@@ -70,10 +70,14 @@ impl EventStream {
path_bytes.len() as cf::CFIndex,
false,
);
- let cf_path = cf::CFURLCopyFileSystemPath(cf_url, cf::kCFURLPOSIXPathStyle);
- cf::CFArrayAppendValue(cf_paths, cf_path);
- cf::CFRelease(cf_path);
- cf::CFRelease(cf_url);
+ if !cf_url.is_null() {
+ let cf_path = cf::CFURLCopyFileSystemPath(cf_url, cf::kCFURLPOSIXPathStyle);
+ cf::CFArrayAppendValue(cf_paths, cf_path);
+ cf::CFRelease(cf_path);
+ cf::CFRelease(cf_url);
+ } else {
+ log::error!("Failed to create CFURL for path: {}", path.display());
+ }
}
let mut state = Box::new(State {