windows服务配置
This commit is contained in:
@@ -405,6 +405,12 @@ pub fn read_command_port() -> io::Result<u16> {
|
|||||||
|
|
||||||
|
|
||||||
pub fn get_home() -> PathBuf {
|
pub fn get_home() -> PathBuf {
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
if let Some(path) = SWITCH_HOME_PATH.lock().as_ref() {
|
||||||
|
return path.clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
||||||
if !home.exists() {
|
if !home.exists() {
|
||||||
std::fs::create_dir(&home).unwrap();
|
std::fs::create_dir(&home).unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user