Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

fix(desktop): allow the geteuid call, and the Windows-only progress file off Windows

Bee7b789dd8f4a8
diff --git a/desktop/app/src/setup.rs b/desktop/app/src/setup.rs
index 3964949..498bd80 100644
--- a/desktop/app/src/setup.rs
+++ b/desktop/app/src/setup.rs
@@ -494,6 +494,7 @@ fn new_events(path: &Path, read: &mut usize) -> Vec<Event> {
fresh
}
+#[cfg_attr(not(windows), allow(dead_code))]
fn progress_file(what: &str) -> PathBuf {
#[cfg(target_os = "linux")]
{
diff --git a/desktop/app/src/updater.rs b/desktop/app/src/updater.rs
index 138d9d6..643686d 100644
--- a/desktop/app/src/updater.rs
+++ b/desktop/app/src/updater.rs
@@ -483,6 +483,7 @@ fn staging_dir() -> PathBuf {
}
#[cfg(not(windows))]
+#[allow(unsafe_code)]
fn current_euid() -> u32 {
// SAFETY: geteuid takes no arguments and cannot fail.
unsafe { libc::geteuid() }