-
Notifications
You must be signed in to change notification settings - Fork 27
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
Validate tmp directory #209
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #209 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 168 168
===========================================
Files 30 30
Lines 470 470
===========================================
Hits 470 470 ☔ View full report in Codecov by Sentry. |
82e3664
to
9ce7f91
Compare
sl-src/Cache.php
Outdated
if (! is_writable($dir)) { | ||
mkdir($dir, 0777, true); | ||
} | ||
if (! is_dir($dir) && ! @mkdir($dir) && ! is_dir($dir) && ! is_writable($dir)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
パーミッションの付与も必要かと思いました。
! @mkdir mkdir($dir, 0777, true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdirのデフォルトのパーミッションは777です。
https://www.php.net/manual/en/function.mkdir.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
マニュアル見ずにコメントしちゃってすみません!
デフォルトで 0777 なんですね。
失礼しました🙇♂️
No description provided.