summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-01 14:44:25 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-01 14:44:25 +1100
commit9baca0e61bbd92b40e79fd9d49549f15cd91329c (patch)
tree16ffcda5fb46699e2c798ca6cb3a6492c52518a5 /src/utils
parentfeat: thumbnailer utility (diff)
downloadcaelestia-shell-9baca0e61bbd92b40e79fd9d49549f15cd91329c.tar.gz
caelestia-shell-9baca0e61bbd92b40e79fd9d49549f15cd91329c.tar.bz2
caelestia-shell-9baca0e61bbd92b40e79fd9d49549f15cd91329c.zip
config: lazy update arrays
Only set arrays if they are different
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/thumbnailer.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/thumbnailer.ts b/src/utils/thumbnailer.ts
index a922590..ffd1c67 100644
--- a/src/utils/thumbnailer.ts
+++ b/src/utils/thumbnailer.ts
@@ -13,7 +13,7 @@ export default class Thumbnailer {
static readonly #running = new Set<string>();
static getThumbPath(path: string) {
- const dir = path.slice(1, path.lastIndexOf("/")).replaceAll("/", "-");
+ const dir = path.slice(path.indexOf("/") + 1, path.lastIndexOf("/")).replaceAll("/", "-");
return `${this.thumbnailDir}/${dir}-${basename(path)}.jpg`;
}