Skip to content

Fix exception when searching for config file - #4138

Merged
forki merged 1 commit into
fsprojects:masterfrom
olivercoad:fix-unauthorizedaccessexception
Apr 10, 2022
Merged

forki merged 1 commit into
fsprojects:masterfrom
olivercoad:fix-unauthorizedaccessexception

Conversation

@olivercoad

Copy link
Copy Markdown
Contributor

Fixes #4137


/// Finds all project files
static member FindAllProjectFiles folder : FileInfo [] =
ProjectFile.SearchAllProjectRelatedFiles "*proj*" folder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that's not the same pattern as we did above, right? This would include "MyprojectFile.fs" or stuff like that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the same as what it was originally (see L1902). Yes it would, but it gets filtered out anyway in the next line.

Do you think I should change it to "*.*proj"?

parent.Remove()

let private configFiles = [ "app"; "web" ] |> Set.ofList
let private projectFiles = [ ".csproj"; ".vbproj"; ".fsproj"; ".wixproj"; ".nproj"; ".vcxproj"; ".pyproj"; ".sfproj"; ".sqlproj" ] |> Set.ofList

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we need to keep this ugly explicit list

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What for? It's private, not used anywhere, and is just a duplicating the list in ProjectFile.fs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wasn't this was filtered things to "*.*proj"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, not since aac9770

@olivercoad

Copy link
Copy Markdown
Contributor Author

Thanks for the quick merge and release!

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.

UnauthorizedAccessException when directory without read access exists

2 participants