Repository navigation
Undelete, attributes, volume label, pack/unpack folders - #3
Merged
Merged
Conversation
- undelete() recovers a deleted file the way MSX-DOS UNDEL does (contiguous clusters from the start cluster), refusing when any of them was reused or a live file took the name. The README already advertised "deleted-entry recovery"; only listing existed. - setAttributes() sets R/H/S/A, keeping the directory/volume bits. - setVolumeLabel() creates, replaces or removes the root VOL entry; volume entries are listed as their 11-char label (no 8.3 dot). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CtBtjm9PRm6sDhDVJbtciC
- pack <hostdir> <out.dsk>: build a 360/720K disk from a folder tree (optional --label); unpack <img> <dir>: extract the whole tree. cli/hostfs.h lists host directories without std::filesystem, so the macOS 10.13 target still builds. - undelete, attrib (+R/-R/+H/-H/+S/-S/+A/-A) and label commands. - Fat12::suggestName83() derives a valid, unique 8.3 name from a host name (MYPROG~1.BAS). `add` without NAME and the GUI's "Add file" use it: since names are validated, long host names were rejected. - GUI: "Undelete" (with the lost first letter) on deleted entries. - cli_smoke covers pack -> unpack, attrib, label, del -> undelete and derived names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CtBtjm9PRm6sDhDVJbtciC
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.
Summary
Follow-up to #2: fills in the "deleted-entry recovery" the README already advertised and adds folder-level import/export.
Core (
Fat12)undelete(e, firstLetter): recovers a deleted file the way MSX-DOS UNDEL does (contiguous clusters from the start cluster); refuses when any cluster was reused or a live file now has the name.setAttributes(e, attr): R/H/S/A bits, directory/volume bits preserved.setVolumeLabel(label): create / replace / remove the root VOL entry; volume entries now list as their 11-character label.suggestName83(hostName, taken): valid unique 8.3 name from any host name (My Long Program.bas→MYLONG~1.BAS).CLI
pack <hostdir> <out.dsk> [360|720] [--label L]andunpack <img> <hostdir>(whole tree, loop-safe).cli/hostfs.havoidsstd::filesystemso the macOS 10.13 build keeps working.undelete,attrib,label.addwithout an explicit NAME derives an 8.3 name; since Core test suite + FAT12/BASIC/DMK/ROM/CLI correctness fixes #2 validates names, long host names were being rejected.GUI
Testing
cli_smokeextended with pack → unpack, attrib, label, del → undelete; all green locally, also under ASan/UBSan.https://claude.ai/code/session_01CtBtjm9PRm6sDhDVJbtciC
Generated by Claude Code