Expand description
Path utilities used by storage layer.
Stored relative paths are normalized to forward slashes regardless of the host OS. This lets the same drive be opened on Linux, Windows, and macOS without the reindexer flagging every photo as “new” because the stored path string differs by separator.
Functions§
- relative_
path_ for_ storage - Convert a relative path into the canonical string form used in the
photos.file_pathand related columns: forward slashes only. - safe_
existing_ path_ under_ root - Resolve an existing DB-stored path and prove it still lives under the trusted root after following symlinks.
- safe_
join_ relative - Join a DB-stored relative path to a trusted root.