Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
style: add CREATE_NO_WINDOW flag for PowerShell clipboard command on Windows
Tonhoaeb6f7cec19b
diff --git a/src-tauri/src/core/clipboard.rs b/src-tauri/src/core/clipboard.rsindex c5680896..8a9b0ed0 100644--- a/src-tauri/src/core/clipboard.rs+++ b/src-tauri/src/core/clipboard.rs@@ -1,5 +1,8 @@use std::path::Path;+#[cfg(target_os = "windows")]+const CREATE_NO_WINDOW: u32 = 0x08000000;+const MAX_CLIPBOARD_FILE_SIZE: u64 = 1_073_741_824; // 1 GBpub async fn copy_file_to_clipboard(path: &Path) -> anyhow::Result<()> {@@ -134,6 +137,7 @@ async fn copy_file_windows(path: &str) -> anyhow::Result<()> {let output = tokio::process::Command::new("powershell").args(["-NoProfile", "-NonInteractive", "-Command", &ps_script])+ .creation_flags(CREATE_NO_WINDOW).output().await?;