Repository navigation
fix: update no longer deletes ISOs and other user files - #104
Merged
Merged
Conversation
The updater mirrored the whole staging directory onto the root of the data partition with `rsync --delete`, excluding only config_priv and tools_priv. Since the staged ISOs/ directory is empty, every image in ISOs/ was removed, along with anything else the user kept on the data partition outside MultiOS-USB/. Mirror only MultiOS-USB/ into MultiOS-USB/ instead, and anchor the excludes so they match just the top-level config_priv and tools_priv. Regression from 532bd52 (first released in v0.14.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused sync preserves user data while retaining deletion of stale managed files.
Review effort: Balanced
Findings: None
What changed in this PR
Restricts Linux updates to managed MultiOS-USB/ content, preserving user files elsewhere on the data partition.
Changes:
- Syncs only the staged
MultiOS-USB/directory. - Anchors private-directory exclusions.
- Creates
ISOs/only when missing.
| File | Description |
|---|---|
multios-usb.sh |
Prevents updates from deleting ISOs and unrelated user files. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since v0.14.0 (532bd52), updating a drive from Linux (
./multios-usb.sh -u /dev/sdX, or option[1] Updatein the menu) deletes everything inISOs/, plus any other files the user keeps on the data partition outsideMultiOS-USB/.The updater builds a staging directory and mirrors it onto the root of the data partition:
build_data_stagecreates an emptyISOs/in the stage, so--deleteremoves every image fromISOs/on the drive. Top-level files and directories that are not part of the stage are removed as well. The menu text says "config_priv/tools_priv/ISOs are never touched".The Windows installer is not affected: it mirrors only
part_2\MultiOS-USBinto<data>:\MultiOS-USB.Fix
Mirror only
MultiOS-USB/intoMultiOS-USB/, which is what the Windows updater already does.ISOs/is still created if it is missing. The excludes are now anchored (/config_priv,/tools_priv) so they match only the top-level directories.Testing
Reproduced and verified by running the update block of the script against scratch directories laid out like a data partition (not on a real device):
ISOs/ubuntu.iso,ISOs/sub/debian.isomy_docs/notes.txt(user file in the partition root)MultiOS-USB/tools_priv/my.efi,MultiOS-USB/config_priv/mine.cfgMultiOS-USB/config/MultiOS-USB/config/grub.config🤖 Generated with Claude Code