@@ -11,8 +11,9 @@ import * as os from 'os';
11
11
import * as path from 'path' ;
12
12
import * as vscode from 'vscode' ;
13
13
14
- const walCachePath = path . join (
15
- os . homedir ( ) , '.cache' , 'hyde' , 'landing' , 'vscode-wallbash.json' ) ;
14
+ const walCachePath =
15
+ path . join ( os . homedir ( ) , '.cache' , 'hyde' , 'wallbash' , 'code.json' ) ;
16
+
16
17
const targetPath = path . join ( __dirname , '..' , 'themes' , 'wallbash.json' ) ;
17
18
const XDG_CONFIG_HOME =
18
19
process . env . XDG_CONFIG_HOME || path . join ( os . homedir ( ) , '.config' ) ;
@@ -26,6 +27,12 @@ export function activate(context: vscode.ExtensionContext) {
26
27
27
28
context . subscriptions . push ( disposable ) ;
28
29
30
+ // Ensure the directory for walCachePath exists
31
+ const walCacheDir = path . dirname ( walCachePath ) ;
32
+ if ( ! fs . existsSync ( walCacheDir ) ) {
33
+ fs . mkdirSync ( walCacheDir , { recursive : true } ) ;
34
+ }
35
+
29
36
// Handle missing cache
30
37
if ( ! fs . existsSync ( walCachePath ) ) {
31
38
fs . copyFile ( targetPath , walCachePath , ( err : NodeJS . ErrnoException | null ) => {
@@ -124,8 +131,14 @@ function populateColorThemes() {
124
131
*/
125
132
function initializeWallTemplates ( enableThemeMode : boolean ) {
126
133
// This is use for Old Hyprdots
127
- const td = fs . existsSync ( path . join ( XDG_CONFIG_HOME , 'hyde' , 'wallbash' , 'theme' ) ) ? 'theme' : 'Wall-Dcol' ;
128
- const ad = fs . existsSync ( path . join ( XDG_CONFIG_HOME , 'hyde' , 'wallbash' , 'theme' ) ) ? 'theme' : 'Wall-Ways' ;
134
+ const td =
135
+ fs . existsSync ( path . join ( XDG_CONFIG_HOME , 'hyde' , 'wallbash' , 'theme' ) ) ?
136
+ 'theme' :
137
+ 'Wall-Dcol' ;
138
+ const ad =
139
+ fs . existsSync ( path . join ( XDG_CONFIG_HOME , 'hyde' , 'wallbash' , 'theme' ) ) ?
140
+ 'theme' :
141
+ 'Wall-Ways' ;
129
142
130
143
const templateSource = path . join ( __dirname , '..' , 'wallbash' , 'code.dcol' ) ;
131
144
const wallWaysDir = path . join ( XDG_CONFIG_HOME , 'hyde' , 'wallbash' , ad ) ;
0 commit comments