Skip to content

Commit a9aeea8

Browse files
committed
fix: update file path handling
1 parent 080134a commit a9aeea8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
getSettingsPath,
44
getLocalSettingsPath,
55
getManualPath,
6-
} from '@/utils/fileFinder';
6+
} from './utils/fileFinder';
77
import { organizeSettings } from './utils/organizer';
88

99
export function activate(context: vscode.ExtensionContext) {

src/utils/fileFinder.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as vscode from 'vscode';
22
import * as fs from 'fs';
33
import * as path from 'path';
4-
import { detectPlatform, getWindowsUsername } from '@/utils/system';
4+
import { detectPlatform, getWindowsUsername } from './system';
55

66
export async function getSettingsPath(): Promise<string | null> {
77
let defaultPath = getUserSettingsPath();
@@ -32,10 +32,15 @@ export async function getManualPath(): Promise<string | null> {
3232
canSelectFiles: true,
3333
canSelectMany: false,
3434
canSelectFolders: false,
35+
filters: {
36+
'JSON files': ['json'],
37+
'All files': ['*']
38+
},
39+
openLabel: 'Select settings.json file'
3540
});
3641

3742
if (path) {
38-
return path[0].path;
43+
return path[0].fsPath;
3944
}
4045

4146
return null;

0 commit comments

Comments
 (0)