Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

A render's progress folder: the home found with a match, not a closure shaped like io/home's LOCALAPPDATA one (the dupes ratchet's 60th near group); same paths, RAEA_RENDERS=off still writes none

shinyobjectzb593ebb0706d
diff --git a/runtime/encode/src/progress.rs b/runtime/encode/src/progress.rs
index 3f211095..465f4bd4 100644
--- a/runtime/encode/src/progress.rs
+++ b/runtime/encode/src/progress.rs
@@ -26,10 +26,15 @@ pub struct Progress {
}
fn dir() -> Option<PathBuf> {
- match std::env::var_os("RAEA_RENDERS") {
- Some(v) if v == "off" => None,
- Some(v) if !v.is_empty() => Some(PathBuf::from(v)),
- _ => std::env::var_os("HOME").or_else(|| std::env::var_os("USERPROFILE")).map(|h| PathBuf::from(h).join(".raea").join("renders")),
+ let named = std::env::var_os("RAEA_RENDERS").filter(|v| !v.is_empty());
+ if named.as_deref() == Some(std::ffi::OsStr::new("off")) {
+ return None;
+ }
+ // unset: ~/.raea/renders, the home being USERPROFILE on Windows, which has no HOME
+ match (named, std::env::var_os("HOME").or(std::env::var_os("USERPROFILE"))) {
+ (Some(d), _) => Some(PathBuf::from(d)),
+ (None, Some(home)) => Some(Path::new(&home).join(".raea/renders")),
+ (None, None) => None,
}
}