Ignore dotfiles and globs

This commit is contained in:
Dylan M. Taylor 2021-04-22 19:36:32 -04:00 committed by GitHub
parent b963ed2631
commit 95e73f65a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ def ask_for_a_timezone():
timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip()
if timezone == '':
timezone = 'UTC'
if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone.strip('*.')).exists():
return timezone
else:
log(