fix bug
parent
aa54812542
commit
6740308799
|
@ -39,13 +39,12 @@ pub fn copy_into_clipboard(config: TakeSnapshotParams) -> Result<()> {
|
||||||
let os_linux_release = sys_info::linux_os_release().unwrap();
|
let os_linux_release = sys_info::linux_os_release().unwrap();
|
||||||
let src_path = format!(
|
let src_path = format!(
|
||||||
"\\\\wsl$\\{}\\tmp\\{}",
|
"\\\\wsl$\\{}\\tmp\\{}",
|
||||||
os_linux_release.pretty_name(),
|
os_linux_release.name(),
|
||||||
filename
|
filename
|
||||||
);
|
);
|
||||||
|
|
||||||
let _ = copy_to_wsl_clipboard(&src_path);
|
let _ = copy_to_wsl_clipboard(&src_path);
|
||||||
//delete the file when done
|
//delete the file when done?
|
||||||
std::fs::remove_file(path).unwrap();
|
|
||||||
} else {
|
} else {
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
Clipboard::new()
|
Clipboard::new()
|
||||||
|
@ -79,8 +78,7 @@ fn copy_to_wsl_clipboard(src_path: &str) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
process::{Command, Stdio},
|
process::{Command, Stdio}, time::Instant
|
||||||
time::Instant,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fn generate_random_filename() -> String {
|
fn generate_random_filename() -> String {
|
||||||
|
|
Loading…
Reference in New Issue