fix: close the tail items from the targeted re-audit
Resolves the 13 rows still partial in docs/rewrite/notes/review-rv4- codex.md (details in final-Z5.md): - Escaped config strings are decoded to raw bytes at every OS boundary: Flatpak cwd/argv to D-Bus, screen-file paths, the default config template, GHOSTTY_RESOURCES_DIR/TERMINFO/shell integration/ bindtextdomain consumers, custom shader loading, list-themes hyperlinks. - osbytes escapes literal U+FDD0 on non-Unix too (bijective everywhere); the GTK paste dialog only decodes text that was actually encoded. - shadertoy: whole-array uses of iChannelTime rebuild a plain float[4] from the std140-padded members (naga-validated, MSL offsets checked). - libghostty-vt: the OSC parser holds caller-allocated storage inline and command payloads borrow from it, so ghostty_osc_end performs no global allocations (verified from Rust and C). - crash: aarch64 Linux minidump context fixed; macOS fatal signals record siginfo, registers and a fault-safe stack walk. - tripwire: selectionString map allocation-failure cleanup test ported. - libghostty-vt emits the versioned soname libghostty-vt.so.0 at build time (no patchelf needed at install). Test Plan: - cargo test --workspace (3342 passed) - just check-macos; just check-macos x86_64-apple-darwin; just check-windows; just check-wasm - cargo check --target aarch64-unknown-linux-gnu -p ghostty-crash
This commit is contained in:
1 parent
5bfc7bd856
commit
1a13e8b556
49 files changed
+1785
-557
No files matched your search
@@ -1,6 +1,3 @@
|
||||
#[cfg(not(windows))]
|
||||
use std::path::Path;
|
||||
|
||||
use crate::i18n_locales::LOCALES;
|
||||
|
||||
/// Application bundle ID, used as the gettext domain
|
||||
@@ -42,16 +39,18 @@ pub fn init(resources_dir: &str) -> Result<(), InitError> {
|
||||
// is standard for translations.
|
||||
// (`std.fs.path.dirname` returns null for a bare relative name, where
|
||||
// `Path::parent` returns an empty path.)
|
||||
let share_dir = Path::new(resources_dir)
|
||||
let resources_dir = crate::osbytes::config_str_to_path(resources_dir);
|
||||
let share_dir = resources_dir
|
||||
.parent()
|
||||
.filter(|p| !p.as_os_str().is_empty())
|
||||
.ok_or(InitError::InvalidResourcesDir)?;
|
||||
|
||||
// Build our locale path
|
||||
let path = format!("{}/locale", share_dir.display());
|
||||
let path = share_dir.join("locale");
|
||||
|
||||
// Bind our bundle ID to the given locale path
|
||||
log::debug!("binding domain={BUNDLE_ID} path={path}");
|
||||
// Bind our bundle ID to the given locale path (gettextrs takes a
|
||||
// `Into<PathBuf>`, so non-UTF-8 bytes are preserved).
|
||||
log::debug!("binding domain={BUNDLE_ID} path={}", path.display());
|
||||
gettextrs::bindtextdomain(BUNDLE_ID, path).map_err(|_| InitError::OutOfMemory)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user