fix: resource file initialization failed

This commit is contained in:
huzibaca 2024-12-01 09:38:29 +08:00
parent a1e8ddb461
commit a1f2a621ef

View File

@ -193,12 +193,7 @@ pub fn init_resources() -> Result<()> {
let _ = fs::create_dir_all(&res_dir); let _ = fs::create_dir_all(&res_dir);
} }
#[cfg(target_os = "windows")]
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"]; let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"];
#[cfg(target_os = "macos")]
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"];
#[cfg(target_os = "linux")]
let file_list: [&str; 0] = [];
// copy the resource file // copy the resource file
// if the source file is newer than the destination file, copy it over // if the source file is newer than the destination file, copy it over