mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Fix permissions when manually copying an uploaded file
This commit is contained in:
parent
79089e5b37
commit
df22d9e69e
1 changed files with 8 additions and 1 deletions
|
|
@ -309,7 +309,14 @@ class Storage
|
|||
|
||||
if ($destination_perms === null)
|
||||
{
|
||||
@chmod($destination, 0777 & @fileperms($source));
|
||||
if (is_uploaded_file($source))
|
||||
{
|
||||
@chmod($destination, 0666 ^ intval(config('file.umask'), 8));
|
||||
}
|
||||
else
|
||||
{
|
||||
@chmod($destination, 0777 & @fileperms($source));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue