Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit 956908e

Browse files
committed
fix: update snippet folder path to use app's config directory
1 parent 6b349b0 commit 956908e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class CssSnippetStoreModal extends Modal {
9797
async install(name: string, code: string) {
9898
const vault = this.app.vault;
9999
const adapter = vault.adapter;
100-
const snippetFolderPath = '.obsidian/snippets';
100+
const snippetFolderPath = this.app.vault.configDir + '/snippets';
101101
const fileName = name + '.css';
102102
const fullPath = `${snippetFolderPath}/${fileName}`;
103103

@@ -125,7 +125,7 @@ class CssSnippetStoreModal extends Modal {
125125

126126
async uninstall(name: string) {
127127
const vault = this.app.vault;
128-
const snippetFolderPath = '.obsidian/snippets';
128+
const snippetFolderPath = this.app.vault.configDir + '/snippets';
129129
const fileName = name + '.css';
130130
const fullPath = `${snippetFolderPath}/${fileName}`;
131131

@@ -145,7 +145,7 @@ class CssSnippetStoreModal extends Modal {
145145

146146
async checkSnippetExists(name: string): Promise<boolean> {
147147
const vault = this.app.vault;
148-
const snippetFolderPath = '.obsidian/snippets';
148+
const snippetFolderPath = this.app.vault.configDir + '/snippets';
149149
const fileName = name + '.css';
150150
const fullPath = `${snippetFolderPath}/${fileName}`;
151151
return await vault.adapter.exists(fullPath);

0 commit comments

Comments
 (0)