Skip to content

Commit 8c8477f

Browse files
author
Alexandre Salomé
committed
Merge pull request #47 from KingCrunch/fix-text-on-linux
chmod() isn't applicatable on symlinks
2 parents c255c30 + 4184886 commit 8c8477f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Gitonomy/Git/Tests/AbstractTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ public static function deleteDir($dir)
109109
$iterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS);
110110
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);
111111
foreach ($iterator as $file) {
112-
chmod($file, 0777);
112+
if (!is_link($file)) {
113+
chmod($file, 0777);
114+
}
113115
if (is_dir($file)) {
114116
rmdir($file);
115117
} else {

0 commit comments

Comments
 (0)