8000 Skip chmod on Windows to avoid unnecessary permission changes (#186) · NativePHP/electron@f60f497 · GitHub
[go: up one dir, main page]

Skip to content

Commit f60f497

Browse files
authored
Skip chmod on Windows to avoid unnecessary permission changes (#186)
* Skip chmod on Windows to avoid unnecessary permission changes * skip fileperms check on Windows systems
1 parent aa7f108 commit f60f497

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Traits/CopiesToBuildDirectory.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,13 @@ public function copyToBuildDirectory(): bool
111111
} catch (Throwable $e) {
112112
warning('[WARNING] '.$e->getMessage());
113113
}
114-
115-
$perms = fileperms($item->getPathname());
116-
117-
if ($perms === false) {
118-
continue;
114+
115+
if (PHP_OS_FAMILY !== 'Windows') {
116+
$perms = fileperms($item->getPathname());
117+
if ($perms !== false) {
118+
chmod($target, $perms);
119+
}
119120
}
120-
121-
chmod($target, $perms);
122121
}
123122

124123
$this->keepRequiredDirectories();

0 commit comments

Comments
 (0)
0