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

Added clause to not read from /etc/timezone if the file exists but is empty #57

Closed
wants to merge 1 commit into from

Conversation

ZackaryWelch
Copy link

When creating a port on FreeBSD, I noticed a port using tzlocal would not run because the timezone reported was ' '. Apparently on some FreeBSD systems /etc/timezone exists but is empty, so tzlocal would open the file but return an invalid time zone, causing the program to crash. I added a clause in the if statement that checked if the file is empty in addition to existing, which fixed the crash.

@regebro
Copy link
Owner

regebro commented Aug 15, 2018

Thanks! I added code that handles if the file is empty, although in a different way.

@regebro regebro closed this Aug 15, 2018
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