Expand description
Merging another Eagle library into the open one (Eagle’s Library ▸ Import Library).
Eagle refuses the library that is open, asks with the other library’s
top-level folder count and the number of entries in its images/, then:
- folders: a top-level folder whose id the open library already has is not added again; its subfolders go through the same test inside the existing one. New folders are added with their whole subtree.
- smart folders and tag groups whose id is already present are skipped, the rest are appended.
- every
images/<id>.infofolder the open library lacks is copied verbatim; ones it has are left alone. The items keep their folder ids, which the merged tree now contains.
falcon differs in two small ways: it copies only *.info folders (not
stray files in images/), and a new folder’s descendants whose ids
already exist elsewhere in the open library are merged into those
instead of being added a second time, so the tree never holds one id
twice. Each item folder is copied under a temporary name and renamed
into place, so an interrupted merge never leaves half an item.
The copy (copy_items) needs no lock on the open library and runs on
a background thread; Library::finish_merge then merges the folder
tree and registers the copied items.
Structs§
- Merge
Plan - What merging
sourcewould bring in, read before asking. - Merge
Report - What a finished merge added.
Enums§
- Merge
Refusal - Why a merge can’t start.
Functions§
- copy_
items - Copies the plan’s item folders that
dest_rootlacks into itsimages/, callingprogress(done, total)after each, and stops early whencancelis set. Returns the folder names copied. A folder that fails to copy is skipped (its partial copy removed) and reported in the second list with the reason. - plan
- Reads
sourceto merge intodest.