Vscode-project-manager: maxDepthRecursion setting shouldn't worry about extra trailing path separator

Created on 11 Aug 2020  路  11Comments  路  Source: alefragnani/vscode-project-manager

Thank you for the awesome plugin!
Is there a way to completely disable recursion? "projectManager.any.maxDepthRecursion": 1, still scans first folders from found directories. For example:

"projectManager.any.maxDepthRecursion": 1,
"projectManager.any.baseFolders": [
    "/mnt/Files/Code/"
]

Shows all found folders in /mnt/Files/Code/ and every first-level folder inside it. I would like to have the ability to display only top-level found folders.

bug

All 11 comments

Hi @Shatur95 ,

In fact, while testing your request (because I was pretty sure it worked), _I just discovered an undocumented feature_ 馃槵

Remove the latest slash from your path, and it will work. I mean, use /mnt/Files/Code instead of /mnt/Files/Code/.

It shouldn't be considered, and I don't know how no one noted that before. I should fix it on the next release.

Thanks for pointing me this.

Interesting :) You are right, removing slash helped me, thanks.

I noticed another problem without trailing separator: it displays Code (Projects folder) in project list too.

Weird, it didn鈥檛 happen on my test.

Are you sure the base Folder is not a Git repo, or is also saved as a Favorite project (used the Save Project command)

Yes, it just a folder that only contains nested folders.

Settings:

    "projectManager.git.maxDepthRecursion": 1,
    "projectManager.git.baseFolders": [
        "/mnt/Files/Git"
    ],
    "projectManager.git.ignoredFolders": [
        "AUR"
    ],
    "projectManager.any.maxDepthRecursion": 1,
    "projectManager.any.baseFolders": [
        "/mnt/Files/Code"
    ],

Folder:

/mnt/Files/Code $ ls
Sample/

Result:

懈蟹芯斜褉邪卸械薪懈械

Well, that I would say it is _by design_.

The Code folder itself is a _regular_ folder (which is the kind of folder the Any handles), so it is also recognized as a project you want to see. That's why I asked about it being a Git folder (you described projectManager.git.baseFolders at the beginning).

Hope this helps

Got it. I would expect that the folders I add for Any are the ones whose contents will be scanned. I never need folder with other projects on my computer as a project itself.

Yep, but it _can add_ the baseFolders as well.

I see your point, and if you really think it would be a good feature to _remove_ the baseFolders from the detected projects, feel free to open a new issue. Doing so, other users could upvote, and it would land on future releases.

Hope this helps

Done, thanks.

In fact, this _extra trailing path separator_ issue has been reported before, but on a PR with a different initial request (#230).

I'm not sure why it ended up lost in time 馃槥

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blackjid picture blackjid  路  3Comments

s97712 picture s97712  路  4Comments

theAkito picture theAkito  路  3Comments

Gama11 picture Gama11  路  6Comments

mt-webdev picture mt-webdev  路  3Comments