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

Do not remove invalid runtime dir, throw exception instead #15

Open
bcremer opened this issue Nov 5, 2014 · 1 comment
Open

Do not remove invalid runtime dir, throw exception instead #15

bcremer opened this issue Nov 5, 2014 · 1 comment

Comments

@bcremer
Copy link
Contributor

bcremer commented Nov 5, 2014

I don't like how an "invalid" runtime directory is unliked at the moment (https://github.com/dnoegel/php-xdg-base-dir/blob/master/src/Xdg.php#L105).

Instead I would like to throw an exception like throw new RuntimeException('Unsecure Runtime dir').
See also this example: https://github.com/o11c/rust-xdg/blob/master/src/xdg.rs#L52

public function getRuntimeDir($strict=true) could become public function getRuntimeDir($create = true, $forceSecure = true).

Feedback welcome.

@nubs
Copy link
Contributor

nubs commented Nov 5, 2014

I tend to agree. I wouldn't want something deleting things on my filesystem when I expect it to be mostly readonly.

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

No branches or pull requests

2 participants