mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-19 00:27:11 +00:00
DES-10 review: link status after open, preflight without reading originals
- Open queues every linked file's lookup (stat, then hash) for the background check instead of stating candidates on the UI thread. - links.list, links.update and relinkFolder use the open's status only while its check is still running; afterwards the file is looked at as it is now. - Preflight tells Modified from size, time and the remembered hash checks (the worker keeps them between passes) and the vector test from the mime type; it never loads a linked original. - A modification time of 0 never vouches for a file's bytes. - Migration keeps an unsettled time as UNVERIFIED_MTIME; recovery snapshots keep images not yet saved as links embedded. - Links panel test fixture has real files, so its Embedded assertions hold.
This commit is contained in:
1 parent
18e1ba14b3
commit
b8be148b4c
10 files changed
+290
-112
No files matched your search
@@ -27,11 +27,11 @@ The proxy is drawn while the original loads, and in place of the original when t
|
||||
| Status | Meaning |
|
||||
|---|---|
|
||||
| OK | A file at the link's path holds the recorded bytes. |
|
||||
| Checking | A file of the recorded size is being hashed in the background. |
|
||||
| Checking | Just after the document opens: the file is being looked for in the background, and hashed when it has the recorded size and another time. |
|
||||
| Modified | A file exists, but its bytes differ from the recorded ones. |
|
||||
| Missing | No file at either path, or a path that is not followed (a path on another computer, a device). |
|
||||
|
||||
Status comes from the content hash. A file with the recorded size and modification time is OK without a read. A file with the recorded size and another time is hashed on a background thread: a matching hash is OK and the new time is remembered, a different hash is Modified. Modification time alone is never trusted to decide Modified, because it is unreliable on network shares.
|
||||
Status comes from the content hash. A file with the recorded size and modification time is OK without a read. A file with the recorded size and another time is hashed on a background thread: a matching hash is OK and the new time is remembered, a different hash is Modified. Modification time alone is never trusted to decide Modified, because it is unreliable on network shares. A file whose file system reports no modification time is always told by its hash.
|
||||
|
||||
A Modified file's bytes are never adopted silently. The proxy stays on screen until you update or relink.
|
||||
|
||||
@@ -59,7 +59,7 @@ A document with any linked asset is written as format version 5; otherwise the v
|
||||
|
||||
## Opening
|
||||
|
||||
Opening reads no original. Each link is looked for at its absolute path, then at its path relative to the document. A match on size and time is OK at once; other candidates are hashed in the background. When both paths exist, the file whose hash matches wins.
|
||||
Opening reads no original and asks nothing of the file system: a background check looks for each link at its absolute path, then at its path relative to the document. A match on size and time is OK without a read; other candidates of the recorded size are hashed. When both paths exist, the file whose hash matches wins.
|
||||
|
||||
## Old files with embedded images
|
||||
|
||||
|
||||
Reference in new issue
Block a user