From 2d3e3a653f7e341eeda3732f00ecbb9966701a72 Mon Sep 17 00:00:00 2001 From: austin62jake Date: Sun, 8 Nov 2026 20:03:15 -0600 Subject: [PATCH] docs: a portable copy keeps its single-instance socket in %LOCALAPPDATA% (#5260) --- apps/pdfcraft/src/single_instance.rs | 5 +++-- crates/ui-egui/src/platform/portable.rs | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/pdfcraft/src/single_instance.rs b/apps/pdfcraft/src/single_instance.rs index 751785d0c5..448eb40d68 100644 --- a/apps/pdfcraft/src/single_instance.rs +++ b/apps/pdfcraft/src/single_instance.rs @@ -4,8 +4,9 @@ //! Outlook attachments, Explorer double-clicks and Open With all start `pdfcraft.exe ""`, and //! a file manager or `xdg-open` starts `pdfcraft ` the same way, so until now every file got //! its own process and window. The first PdfCraft listens on a Unix domain socket. On Windows (10 -//! 1803 and later) it is in `%LOCALAPPDATA%\PdfCraft`, or in the data folder of a portable copy, -//! and is named after the Windows session (`instance-Console.sock`), so two sign-ins of the same +//! 1803 and later) it is in `%LOCALAPPDATA%\PdfCraft` (a portable copy's too, as +//! `portable-instance-…` and never in its own folder, #889) and is named after the Windows +//! session (`instance-s1.sock` for session 1), so two sign-ins of the same //! user never open files in each other's windows. On Linux and the BSDs it is in //! `$XDG_RUNTIME_DIR/pdfcraft` and is named after the display (`instance-wayland-0.sock`), so a //! launch on another display or seat opens its own window there. Either way it lives in a folder diff --git a/crates/ui-egui/src/platform/portable.rs b/crates/ui-egui/src/platform/portable.rs index fefa268e09..fcd6053fd4 100644 --- a/crates/ui-egui/src/platform/portable.rs +++ b/crates/ui-egui/src/platform/portable.rs @@ -1,8 +1,10 @@ //! Portable mode (#157): a marker file beside the executable ([`MARKERS`]) keeps the settings, //! log files, crash-recovery autosaves and new digital IDs in `/PdfCraftData`, so a -//! portable copy (on a USB stick, say) writes nothing to `%APPDATA%` or `%LOCALAPPDATA%`. The -//! Windows portable zip ships with `portable.txt`; the MSI doesn't. PhotoCraft uses the same -//! scheme (`photocraft/apps/photocraft/src/app_dirs.rs`). +//! portable copy (on a USB stick, say) writes nothing to `%APPDATA%`. In `%LOCALAPPDATA%` it keeps +//! only its single-instance socket and lock, two empty files in `%LOCALAPPDATA%\PdfCraft` that +//! must stay private to the user (#889, `apps/pdfcraft/src/single_instance.rs`). The Windows +//! portable zip ships with `portable.txt`; the MSI doesn't. PhotoCraft uses the same scheme +//! (`photocraft/apps/photocraft/src/app_dirs.rs`). //! //! If that folder can't be written (read-only medium, Program Files), portable mode stays off, the //! per-user folders are used and the app says why.