mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3484] [Issue]: Windows uninstaller deletes packages/server/data (all user data) before the keep-data prompt #1882
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1882
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jul 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3484
Originally assigned to: @SpicyMarinara, @kolacheee on GitHub.
Summary
The Windows uninstaller's comment promises to preserve user data, but the code removes the entire
packagestree — which contains the canonical data directorypackages/server/data(chats, characters, images, the database) — and the "keep your data?" prompt only guards the legacy top-leveldata\folder.Why this is a problem: the comment and the prompt both tell the user their data is safe while the code deletes it.
What it negatively affects: complete, silent user-data loss on uninstall for default installer-based Windows installs, even when the user explicitly chooses to keep their data.
Expected behavior
Uninstalling keeps
packages/server/dataunless the user explicitly declines the keep-data prompt.Actual behavior
win/installer/installer.nsi:824-827— the comment "Only remove known app directories — preserve user data if they stored it elsewhere" is immediately followed byRMDir /r "$INSTDIR\packages", which unconditionally wipespackages\server\data. The keep-data prompt only protects$INSTDIR\data(the legacy location).win/installer/installer.nsi:830—RMDir /r "$INSTDIR\installer"targets a pre-win/-reorg path that no longer exists, and nothing removes$INSTDIR\win, so uninstall leaveswin\installerandwin\launcherbehind.win/installer/installer.nsi:3— header claims the installer is "Cross-compiled from macOS"; CI builds it onubuntu-latest.Steps to reproduce
packages\server\data).packages\server\datais deleted anyway.Note: verified by reading the NSIS source; not executed on a disposable machine. The
RMDir /r "$INSTDIR\packages"line runs unconditionally before/independently of the prompt guard, so the outcome follows from the script.Environment
45b650de9)Logs, screenshots, or video
N/A — file/line references above point at the exact code.
Additional context
Found by a repo-wide read-only sweep for dead code and stale comments; adversarially re-verified before filing. No fix started — filing for triage. Suggested direction: move the
packagesremoval behind the same keep-data decision, or excludepackages\server\datafrom the recursive delete and remove it only when the user declines to keep data. Part of a coordinated set of sweep catalogue issues filed together.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@kolacheee commented on GitHub (Jul 11, 2026):
will do tomorrow
@kolacheee commented on GitHub (Jul 12, 2026):
this has not been fixed yet btw
@SpicyMarinara commented on GitHub (Jul 12, 2026):
@kolacheee I am taking this into the combined fix PR #3516 now, including the canonical packages/server/data preservation path and the stale Windows installer cleanup, so please avoid duplicating the implementation.
@SpicyMarinara commented on GitHub (Jul 12, 2026):
Fixed in #3516 (commit
d10626344): the Windows uninstaller now decides data retention before cleanup, preserves and restores packages/server/data, supports legacy data, and the NSIS source guard plus native compilation pass.