fix flink

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-02-07 12:47:07 +08:00
parent 086bef41f4
commit e1a9cfcf7f

View File

@ -118,11 +118,9 @@ impl SharedMemory {
fn flink(name: String) -> ResultType<String> {
let disk = std::env::var("SystemDrive").unwrap_or("C:".to_string());
let mut dir = PathBuf::from(disk);
let dir1 = dir.join("ProgramData");
let dir2 = std::env::var("TEMP")
.map(|d| PathBuf::from(d))
.unwrap_or(dir.join("Windows").join("Temp"));
let dir1 = PathBuf::from(format!("{}\\ProgramData", disk));
let dir2 = PathBuf::from(format!("{}\\Windows\\Temp", disk));
let mut dir;
if dir1.exists() {
dir = dir1;
} else if dir2.exists() {