Skip to content

Commit d235706

Browse files
authored
Merge pull request #14 from neet/patch-windows-broken-path
Windowsでファイルパスのパースに失敗するバグを修正
2 parents ed4328a + a95cf92 commit d235706

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/commands/compose.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export async function compose (resource?: Uri) {
100100
);
101101

102102
if (result === openInBrowser) {
103-
commands.executeCommand('vscode.open', Uri.parse(item.url));
103+
commands.executeCommand('vscode.open', item.url);
104104
}
105105
} catch (error) {
106106
// tslint:disable-next-line:no-console

src/commands/openItem.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function openItem (storagePath?: string) {
5151
}
5252

5353
try {
54-
const fileUri = Uri.parse(`file://${storagePath}/${item.id}.md`);
54+
const fileUri = Uri.file(`${storagePath}/${item.id}.md`);
5555

5656
// 拡張機能用ディレクトリがない場合初期化
5757
if (!fs.existsSync(storagePath)) {

src/explorers/nodes/qiitaItemsNode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ export class QiitaItem extends TreeItem {
1616
super(item.title, collapsibleState);
1717
}
1818

19-
public resourceUri = Uri.parse('file:///text.md'); // Hack: アイコンをMarkdownのものに
19+
public resourceUri = Uri.file('text.md'); // Hack: アイコンをMarkdownのものに
2020
public contextValue = 'qiitaItems';
2121
}

0 commit comments

Comments
 (0)