| 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. |
| 210 | function 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:// |