Expand description
Copy the user’s files from the old locations into the scope home, once.
Old versions kept the config, venues and address book in
~/.config/scope (or the platform config folder), and tokens and TUI
state in the platform data folder. A start copies every old file whose
new copy does not exist. Nothing old is deleted or changed, and no new
file is written over. Each copy, and each failed copy, gets one line in
state/migration.jsonl (the audit record).
It happens once: scope has one home. When a run that copied files
finishes, the log gets a complete line, and no later start reads the
old folders again, so a copy the user deleted stays deleted and a file
added to an old folder is ignored. A log from before that line existed
still stops a file it shows as copied from being copied back. A start
with nothing to copy writes nothing, so a read-only home works.
Structs§
Enums§
- Outcome
- What happened to one item.
Functions§
- items_
for - The old-to-new list for the given old roots and new home.
xdg_rootis~/.config/scope; the platform roots are the folders above theirscopesubfolder. - legacy_
items - The real old-to-new list for this machine.
- migrate
- Migrates this machine’s old files into the scope home.
- run
- Copies each item whose source exists, whose destination does not, and
that
logdoes not show as copied already, logging each copy and each failure tolog. Stops at the first failed copy with an error that names the file; the files copied before it stay.