Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow root meson.build files to be symlinks #208

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Allow root meson.build files to be symlinks #208

merged 1 commit into from
Nov 29, 2023

Conversation

tristan957
Copy link
Contributor

Fixes #207

@tristan957 tristan957 merged commit 9e6632a into main Nov 29, 2023
6 checks passed
@@ -198,7 +198,7 @@ export async function mesonRootDirs(): Promise<string[]> {
let hasMesonFile: boolean = false;
let subdirs: vscode.Uri[] = [];
for (const [name, type] of await vscode.workspace.fs.readDirectory(d)) {
if (type === vscode.FileType.File && name == "meson.build") {
if ((type === vscode.FileType.File || type === vscode.FileType.SymbolicLink) && name == "meson.build") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((type === vscode.FileType.File || type === vscode.FileType.SymbolicLink) && name == "meson.build") {
if ((type === vscode.FileType.File || type === (vscode.FileType.File | vscode.FileType.SymbolicLink)) && name == "meson.build") {

AFAICT this is the correct check. Based on this sample, and the debugger showing type is 65 for symlinked files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Can you submit a PR? I'll cook up a release tomorrow. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension ignores root meson.build if it's a symlink
2 participants