You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"packaged webui index is missing at {}, trying fallback data/dist",
320
-
candidate.join("index.html").display()
321
-
));
322
-
ifletSome(fallback) = fallback_webui_dir {
323
-
append_desktop_log(&format!(
324
-
"using fallback webui directory: {}",
325
-
fallback.display()
326
-
));
327
-
fallback
328
-
}else{
329
-
returnErr(format!(
330
-
"Packaged WebUI is unavailable. Missing embedded index at {} and fallback data/dist. Please reinstall AstrBot or download the matching dist.zip to data/dist.",
331
-
candidate.join("index.html").display()
332
-
));
333
-
}
334
-
}
335
-
None => {
336
-
ifletSome(fallback) = fallback_webui_dir {
337
-
append_desktop_log(&format!(
338
-
"embedded webui directory not found, using fallback webui directory: {}",
339
-
fallback.display()
340
-
));
341
-
fallback
342
-
}else{
343
-
returnErr(
344
-
"Packaged WebUI directory is missing and fallback data/dist is unavailable. Please reinstall AstrBot or download the matching dist.zip to data/dist."
345
-
.to_string(),
346
-
);
347
-
}
348
-
}
349
-
};
314
+
let webui_dir = resolve_packaged_webui_dir(embedded_webui_dir, root_dir.as_deref())?;
let embedded_index = candidate.join("index.html");
2208
+
if embedded_index.is_file(){
2209
+
returnOk(candidate);
2210
+
}
2211
+
2212
+
append_desktop_log(&format!(
2213
+
"packaged webui index is missing at {}, trying fallback data/dist",
2214
+
embedded_index.display()
2215
+
));
2216
+
2217
+
ifletSome(fallback) = fallback_webui_dir {
2218
+
append_desktop_log(&format!(
2219
+
"using fallback webui directory: {}",
2220
+
fallback.display()
2221
+
));
2222
+
returnOk(fallback);
2223
+
}
2224
+
2225
+
let fallback_index = fallback_index_path.unwrap_or_else(|| "<unresolved>".to_string());
2226
+
append_desktop_log(&format!(
2227
+
"packaged webui resolution failed: embedded index missing at {}, fallback index missing at {}",
2228
+
embedded_index.display(),
2229
+
fallback_index
2230
+
));
2231
+
2232
+
Err(format!(
2233
+
"Packaged WebUI is unavailable. Missing embedded index at {} and fallback data/dist. Please reinstall AstrBot or download the matching dist.zip to data/dist.",
2234
+
embedded_index.display()
2235
+
))
2236
+
}
2237
+
None => {
2238
+
ifletSome(fallback) = fallback_webui_dir {
2239
+
append_desktop_log(&format!(
2240
+
"embedded webui directory not found, using fallback webui directory: {}",
2241
+
fallback.display()
2242
+
));
2243
+
returnOk(fallback);
2244
+
}
2245
+
2246
+
let fallback_index = fallback_index_path.unwrap_or_else(|| "<unresolved>".to_string());
2247
+
append_desktop_log(&format!(
2248
+
"packaged webui resolution failed: embedded webui directory is missing, fallback index missing at {}",
2249
+
fallback_index
2250
+
));
2251
+
2252
+
Err(
2253
+
"Packaged WebUI directory is missing and fallback data/dist is unavailable. Please reinstall AstrBot or download the matching dist.zip to data/dist."
0 commit comments