This repository was archived by the owner on Apr 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import setPlugin from "./setPlugin";
33import setLibrary from "./setLibrary" ;
44import setNativeLibrary from "./setNativeLibrary" ;
55import * as path from "path" ;
6- import { platform } from "os" ;
76
87export const id = "overextended.cfxlua-vscode" ;
98export const extension = extensions . getExtension ( id ) ! ;
@@ -17,14 +16,13 @@ export async function activate(context: ExtensionContext) {
1716 const sourceUri = Uri . joinPath ( extension . extensionUri , "plugin" ) ;
1817 const targetUri = Uri . joinPath ( storageUri , "cfxlua" ) ;
1918 storagePath = targetUri . toString ( ) ;
20- // istg they go out of their way to make referencing the global storage path annoying
21- storagePath = path . join (
22- "~" ,
23- platform ( ) === "win32" ? "AppData\\Roaming" : ".config" ,
24- storagePath . substring ( storagePath . indexOf ( "Code" ) ) ,
25- ) ;
2619
27- console . log ( "storagePath" , storagePath ) ;
20+ if ( storagePath . includes ( "AppData" ) ) {
21+ storagePath = path . join (
22+ "~" ,
23+ storagePath . substring ( storagePath . indexOf ( "AppData" ) ) ,
24+ ) ;
25+ }
2826
2927 try {
3028 await workspace . fs . stat ( targetUri ) ;
You can’t perform that action at this time.
0 commit comments