Skip to content

Plugin incorrectly uses the name of the workspace as the name of the folder #12

@laurent22

Description

@laurent22

I have my code-workspace file setup like this:

{
	"folders": [
		{
			"name": "Joplin",
			"path": "."
		},
		{
			"name": "Joplin Nextcloud App",
			"path": "D:/nextcloud/apps/joplin"
		},
	],
	"settings": {
		"files.exclude": {
			// ...
		},
	},
}

So there are two folders, one that's just the current directory . and another one which points to another directory. When I run the Gitignored command, it adds the files like this:

"settings": {
	"files.exclude": {
		"Joplin/node_modules",
		"Joplin/......",
	},
},

So it prefixes all the path with "Joplin/", but that doesn't work because it's not a path but just a workspace name (which can be anything).

For now I've solved it by renaming my workspace to "." like so:

"folders": [
	{
		"name": ".",
		"path": "."
	},
	// ....
],

Not ideal but at least it works as in that case it sets the paths as ./node_modules etc.

So for the plugin I think the solution would be to take the value from the "path" key, and not from the "name" one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions