MCPcopy Create free account
hub / github.com/basecamp/omarchy / localImageFile

Function localImageFile

shell/plugins/notifications/NotificationLogic.js:210–217  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

208// The filesystem path behind a file-backed image value, or "" for anything
209// a copy can't capture: themed icon names, in-process image:// URLs, empty.
210function localImageFile(value) {
211 var s = String(value || "")
212 if (s.indexOf("file://") === 0) {
213 s = s.slice(7)
214 try { s = decodeURIComponent(s) } catch (e) {}
215 }
216 return s.charAt(0) === "/" ? s : ""
217}
218
219// The entry as it should hit the disk, plus the copies that make it true.
220// File-backed images redirect to their copy under imagesDir; dead image://

Callers 1

persistablePopupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected