Skip to content

Commit 2077eea

Browse files
0.8: 修复跨平台条件编译的bug
1 parent fc58768 commit 2077eea

File tree

1 file changed

+3
-1
lines changed
  • app/search-files-app/src-tauri/src

1 file changed

+3
-1
lines changed

app/search-files-app/src-tauri/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
33

44
use std::env;
5-
use std::os::windows::process::CommandExt;
65
use std::path::PathBuf;
76
use std::process::Command;
87
use std::sync::Arc;
@@ -12,6 +11,9 @@ use std::time::Instant;
1211
use tauri::GlobalShortcutManager;
1312
use tauri::{CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu};
1413

14+
#[cfg(target_os = "windows")]
15+
use std::os::windows::process::CommandExt;
16+
1517
/// 打开文件
1618
#[tauri::command]
1719
fn open_file(name: String) {

0 commit comments

Comments
 (0)