Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix: NSPasteboard error on x86
Richie McIlroy0a1f4d0584c2
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rsindex 7e4317370..d9097d8dd 100644--- a/apps/desktop/src-tauri/src/lib.rs+++ b/apps/desktop/src-tauri/src/lib.rs@@ -1276,20 +1276,29 @@ async fn copy_rendered_video_to_clipboard(let pasteboard: id = NSPasteboard::generalPasteboard(nil);NSPasteboard::clearContents(pasteboard);- let url =- NSURL::fileURLWithPath_(nil, NSString::alloc(nil).init_str(output_path_str));+ let url_str = NSString::alloc(nil).init_str(output_path_str);+ let url = NSURL::fileURLWithPath_(nil, url_str);- let objects: id = NSArray::arrayWithObject(nil, url);+ if url == nil {+ return Err("Failed to create NSURL".to_string());+ }- if !NSPasteboard::writeObjects(pasteboard, objects) {- Err("Failed to write to clipboard".to_string())- } else {- Ok(())+ let objects = NSArray::arrayWithObject(nil, url);+ if objects == nil {+ return Err("Failed to create NSArray".to_string());}++ let success = NSPasteboard::writeObjects(pasteboard, objects);+ if !success {+ return Err("Failed to write to pasteboard".to_string());+ }++ Ok(())})};if let Err(e) = result {+ println!("Failed to copy to clipboard: {}", e);notifications::send_notification(&app,notifications::NotificationType::VideoCopyFailed,