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

FileStorage: always creates directories #47

Merged
merged 1 commit into from
Jan 29, 2017
Merged

FileStorage: always creates directories #47

merged 1 commit into from
Jan 29, 2017

Conversation

dg
Copy link
Member

@dg dg commented Oct 6, 2016

Problem with mkdir() and safe mode is outdated, isn't it?

@@ -27,6 +27,8 @@ public function __construct($tempDir)

public function loadConfiguration()
{
@mkdir($this->tempDir . '/cache'); // @ - directory may exists
Copy link
Contributor

@fprochazka fprochazka Oct 6, 2016

Choose a reason for hiding this comment

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

Imho there should be a check for the return value and exception, no?

if (!@mkdir(...) && !is_dir(...)) throw

Copy link
Member Author

Choose a reason for hiding this comment

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

FileStorage will throw exception.

@dg dg merged commit 92222cb into nette:master Jan 29, 2017
@dg dg deleted the pull-dirs branch January 29, 2017 20:47
dg added a commit that referenced this pull request Feb 2, 2017
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