mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-23 09:13:07 +01:00
Update destination file permissions after copying
This commit is contained in:
parent
851b945560
commit
a90df59e41
@ -484,6 +484,7 @@ class FileSystem
|
||||
static::assertExists($destination, false);
|
||||
}
|
||||
if (@copy($source, $destination)) {
|
||||
@chmod($destination, @fileperms($source));
|
||||
return true;
|
||||
}
|
||||
throw new FileSystemException(sprintf('Cannot copy file "%s": %s', $source, static::getLastErrorMessage()));
|
||||
@ -505,6 +506,7 @@ class FileSystem
|
||||
if (!static::exists($destination)) {
|
||||
static::createDirectory($destination, true);
|
||||
}
|
||||
@chmod($destination, @fileperms($source));
|
||||
try {
|
||||
foreach (static::listContents($source, self::LIST_ALL) as $item) {
|
||||
$sourceItemPath = static::joinPaths($source, $item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user