From 824b2dbd764c24551a05825904f87fc8d376a1c3 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 1 Oct 2026 15:35:38 +0000 Subject: [PATCH] Photo.savePath docs: a live photo not yet stored may move For a live photo the backup has not stored, savePath carries the title's extension, and the backup may store the image under the one found inside the live photo. The comment on Photo.savePath and the README now say so, as the comment on ContentCache.savePath does. Model: opus-5-5 --- README.md | 9 +++++---- src/library/read.ts | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 90bfe83..a75f15b 100644 --- a/README.md +++ b/README.md @@ -699,10 +699,11 @@ synchronous getters look at the disk and never touch the network: - `photo.savePath` → `string | undefined` — where `lib.backup()` writes the original, `originals/.` under the `downloadDirectory` the library - was opened with, whether or not it is there yet. For a live photo the backup - has stored, it is the image's path, whose extension comes from inside the live - photo and can differ from the title's. `undefined` when the library has no - `downloadDirectory` or no content source. + was opened with, whether or not it is there yet: for a live photo already + stored, its image. For a live photo not yet stored, it carries the title's + extension, and the backup may store the image under a different one, found + inside the live photo. `undefined` when the library has no `downloadDirectory` + or no content source. - `photo.isLocal` → `boolean` — whether the whole original is at `savePath`. Four async methods may download: diff --git a/src/library/read.ts b/src/library/read.ts index e34abeb..a10731d 100644 --- a/src/library/read.ts +++ b/src/library/read.ts @@ -89,9 +89,11 @@ export class Photo { return this.rec.isHidden; } - // The path `lib.backup()` writes the original to in the library's download - // directory, whether or not it is there yet; for a live photo, its image. - // Undefined when the library has no download directory or no content + // Where `lib.backup()` stores the original in the library's download + // directory, whether or not it is there yet: for a live photo already + // stored, its image. For a live photo not yet stored, it carries the + // title's extension, and the backup may store the image under a different + // one. Undefined when the library has no download directory or no content // cache. get savePath(): string | undefined { return this.cache?.savePath(this.rec.fileID);