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

Catch permission error when making cache dir, as well as cache file #211

Merged
merged 3 commits into from
Oct 25, 2020

Conversation

john-kurkowski
Copy link
Owner

@john-kurkowski john-kurkowski commented Oct 24, 2020

Stanches #209.

  • Move makedir side-effect from string building helper function into try block
  • Duplicate warning from writing a single cache file
  • Log this at most once per app
  • Remove unused vars

Fixes #209.

* Move makedir side-effect from string building helper function into try block
* Duplicate warning from writing a single cache file
* Log this at most once per app
@john-kurkowski
Copy link
Owner Author

FYI @brycedrennan

@brycedrennan
Copy link
Collaborator

Ah I hadn't noticed #209 . So it seems some installations have permission to create a file but not a directory. interesting. I wonder if we should just use a system temp folder instead.

I'll look more in depth at this tomorrow.

@john-kurkowski
Copy link
Owner Author

I think it's that creating the directory wasn't wrapped in a try. Everything else was. Not about the way user systems distinguish files vs. directories.

System temp folders have been suggested several times in the issue tracker. I was opposed, because I don't want the suffix list to be temporary, evicted at any time by the OS. Maybe I should soften my stance.

My favorite suggestion is to switch to an XDG standard location.

@john-kurkowski john-kurkowski merged commit 653abc9 into master Oct 25, 2020
@john-kurkowski john-kurkowski deleted the bugfix/makedirs-permission-error branch October 25, 2020 04:04
@john-kurkowski
Copy link
Owner Author

Stanches #209 for now. Let's keep that one open for a longer term fix.

@brycedrennan
Copy link
Collaborator

Sounds good

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Oct 26, 2020
https://build.opensuse.org/request/show/843974
by user mia + dimstar_suse
- Update to 3.0.2:
  * Catch permission error when making cache dir, as well as cache
    file (john-kurkowski/tldextract#211)
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