Skip to content
Snippets Groups Projects
Unverified Commit e64103e5 authored by GyDi's avatar GyDi
Browse files

fix: copy resource file

parent f0ab03a9
No related branches found
No related tags found
No related merge requests found
...@@ -87,19 +87,11 @@ pub fn init_resources(package_info: &PackageInfo) { ...@@ -87,19 +87,11 @@ pub fn init_resources(package_info: &PackageInfo) {
} }
// copy the resource file // copy the resource file
let mmdb_path = app_dir.join("Country.mmdb"); for file in ["Country.mmdb", "geoip.dat", "geosite.dat", "wintun.dll"].iter() {
let mmdb_tmpl = res_dir.join("Country.mmdb"); let src_path = res_dir.join(file);
if !mmdb_path.exists() && mmdb_tmpl.exists() { let target_path = app_dir.join(file);
let _ = fs::copy(mmdb_tmpl, mmdb_path); if src_path.exists() {
} let _ = fs::copy(src_path, target_path);
// copy the wintun.dll
#[cfg(target_os = "windows")]
{
let wintun_path = app_dir.join("wintun.dll");
let wintun_tmpl = res_dir.join("wintun.dll");
if !wintun_path.exists() && wintun_tmpl.exists() {
let _ = fs::copy(wintun_tmpl, wintun_path);
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment