Skip to content

Commit ce5e4f7

Browse files
authored
fix: fileperms(): stat failed for public/storage (#199)
* fix: fileperms(): stat failed for public/storage * fix: fileperms(): stat failed for public/storage
1 parent 59e041b commit ce5e4f7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Traits/CopiesToBuildDirectory.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ public function copyToBuildDirectory(): bool
108108

109109
try {
110110
copy($item->getPathname(), $target);
111-
} catch (Throwable $e) {
112-
warning('[WARNING] '.$e->getMessage());
113-
}
114111

115-
if (PHP_OS_FAMILY !== 'Windows') {
116-
$perms = fileperms($item->getPathname());
117-
if ($perms !== false) {
118-
chmod($target, $perms);
112+
if (PHP_OS_FAMILY !== 'Windows') {
113+
$perms = fileperms($item->getPathname());
114+
if ($perms !== false) {
115+
chmod($target, $perms);
116+
}
119117
}
118+
} catch (Throwable $e) {
119+
warning('[WARNING] '.$e->getMessage());
120120
}
121121
}
122122

0 commit comments

Comments
 (0)