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

Validate tmp directory #209

Merged
merged 5 commits into from
Jan 19, 2024
Merged

Validate tmp directory #209

merged 5 commits into from
Jan 19, 2024

Conversation

koriym
Copy link
Member

@koriym koriym commented Jan 13, 2024

No description provided.

Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0961e4a) 100.00% compared to head (9ce7f91) 100.00%.
Report is 4 commits behind head on 2.x.

❗ Current head 9ce7f91 differs from pull request most recent head 93ea388. Consider uploading reports for the commit 93ea388 to get more accurate results

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.
📢 Have feedback on the report? Share it here.

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)) {
Copy link
Contributor

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)

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

マニュアル見ずにコメントしちゃってすみません!
デフォルトで 0777 なんですね。
失礼しました🙇‍♂️

@koriym koriym merged commit 80b12a6 into ray-di:2.x Jan 19, 2024
19 checks passed
@koriym koriym deleted the validate-tmp-dir branch January 19, 2024 14:36
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