Skip to content

Conversation

@foreverigor
Copy link
Contributor

To create missing .ssh folder Files.createDirectories(...) is used which always tries to create a directory.
In some cases, especially when .ssh is actually a symbolic link this results in an uncatched FileAlreadyExistsException being thrown.

This PR mitigates this by replacing the folder creation with File#mkdirs() which checks the existence of the path before doing anything.

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Thank you!

@code-asher code-asher merged commit 8c676c6 into coder:main Jan 5, 2024
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.

2 participants