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

Check for directory existence before attempting access. #88

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

billrob
Copy link
Contributor

@billrob billrob commented Mar 12, 2019

Stops exception from being thrown and tripping breakpoints when debugging application code.

Plus good practice to avoid exceptions.

@nblumhardt
Copy link
Member

Thanks! The check is worthwhile 👍 -- it still needs the try/catch block in there, though, as the directory could in theory be deleted between the check and the file iteration (unlikely, I know - but there's some pretty defensive code in this sink :-) )

Stops exception from being thrown and tripping breakpoints when debugging application code.
@billrob
Copy link
Contributor Author

billrob commented Mar 13, 2019

I understand and updated.

Copy link
Member

@nblumhardt nblumhardt left a comment

Choose a reason for hiding this comment

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

Thanks!

@nblumhardt nblumhardt merged commit 0c65484 into serilog:dev Mar 13, 2019
@nblumhardt
Copy link
Member

Looks like the Travis build has hung before starting; think this is safe to merge, will keep an eye on later builds from dev.

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