mirror of
https://github.com/mistricky/codesnap.nvim.git
synced 2025-02-21 07:27:26 -08:00
fix bug
This commit is contained in:
parent
aa54812542
commit
6740308799
1 changed files with 3 additions and 5 deletions
|
@ -39,13 +39,12 @@ pub fn copy_into_clipboard(config: TakeSnapshotParams) -> Result<()> {
|
|||
let os_linux_release = sys_info::linux_os_release().unwrap();
|
||||
let src_path = format!(
|
||||
"\\\\wsl$\\{}\\tmp\\{}",
|
||||
os_linux_release.pretty_name(),
|
||||
os_linux_release.name(),
|
||||
filename
|
||||
);
|
||||
|
||||
let _ = copy_to_wsl_clipboard(&src_path);
|
||||
//delete the file when done
|
||||
std::fs::remove_file(path).unwrap();
|
||||
//delete the file when done?
|
||||
} else {
|
||||
std::thread::spawn(move || {
|
||||
Clipboard::new()
|
||||
|
@ -79,8 +78,7 @@ fn copy_to_wsl_clipboard(src_path: &str) -> Result<()> {
|
|||
}
|
||||
|
||||
use std::{
|
||||
process::{Command, Stdio},
|
||||
time::Instant,
|
||||
process::{Command, Stdio}, time::Instant
|
||||
};
|
||||
|
||||
fn generate_random_filename() -> String {
|
||||
|
|
Loading…
Reference in a new issue