Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8086c7b

Browse files
authored
fix: use user-data-dir for storage (#94)
1 parent4662ebd commit8086c7b

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

‎src/commands.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class Commands {
217217
if(agents.length===1){
218218
folderPath=agents[0].expanded_directory
219219
workspaceAgent=agents[0].name
220-
}else{
220+
}elseif(agents.length>0){
221221
constagentQuickPick=vscode.window.createQuickPick()
222222
agentQuickPick.title=`Select an agent`
223223

‎src/sshSupport.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { sshSupportsSetEnv, sshVersionSupportsSetEnv } from "./sshSupport"
33

44
constsupports={
55
"OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022":true,
6+
"OpenSSH_9.0p1, LibreSSL 3.3.6":true,
67
"OpenSSH_7.6p1 Ubuntu-4ubuntu0.7, OpenSSL 1.0.2n 7 Dec 2017":false,
78
"OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017":false,
89
}

‎src/sshSupport.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ export function sshVersionSupportsSetEnv(sshVersionString: string): boolean {
2424
returnfalse
2525
}
2626
// 7.8 is the first version that supports SetEnv
27-
if(Number.parseInt(parts[0],10)<7){
27+
constmajor=Number.parseInt(parts[0],10)
28+
constminor=Number.parseInt(parts[1],10)
29+
if(major<7){
2830
returnfalse
2931
}
30-
if(Number.parseInt(parts[1],10)<8){
32+
if(major===7&&minor<8){
3133
returnfalse
3234
}
3335
returntrue

‎src/storage.ts‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class Storage {
264264
}
265265

266266
publicgetUserSettingsPath():string{
267-
returnpath.join(this.appDataDir(),"Code","User","settings.json")
267+
returnpath.join(this.globalStorageUri.fsPath,"..","..","..","User","settings.json")
268268
}
269269

270270
publicgetSessionTokenPath():string{
@@ -292,19 +292,6 @@ export class Storage {
292292
})
293293
}
294294

295-
privateappDataDir():string{
296-
switch(process.platform){
297-
case"darwin":
298-
return`${os.homedir()}/Library/Application Support`
299-
case"linux":
300-
return`${os.homedir()}/.config`
301-
case"win32":
302-
returnprocess.env.APPDATA||""
303-
default:
304-
return"/var/local"
305-
}
306-
}
307-
308295
privateasyncupdateURL():Promise<void>{
309296
consturl=this.getURL()
310297
axios.defaults.baseURL=url

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp