Skip to content

Commit

Permalink
[fix] fix wrong cofiguration name
Browse files Browse the repository at this point in the history
  • Loading branch information
fliklab committed May 11, 2024
1 parent f32a799 commit 370dfc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ export function activate(context: vscode.ExtensionContext) {
const text = document.getText(selection);
const includeFilePath = vscode.workspace
.getConfiguration("YOCO")
.get<boolean>("includeFilePaths", false);
.get<boolean>("includeFilePath", false);

let filePath = document.uri.path;
const workspacePath = vscode.workspace.getWorkspaceFolder(document.uri);

// 설정이 true일 때만 파일 경로를 포함
if (includeFilePath && workspacePath) {
const relativePath = path.relative(workspacePath.uri.path, document.uri.fsPath);
filePath = relativePath;
filePath = path.relative(workspacePath.uri.path, document.uri.path);
} else {
filePath = document.uri.path.split("/").pop() || "Untitled";
}
Expand Down

0 comments on commit 370dfc5

Please sign in to comment.