Index: trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | * @see Filesystem::changeFileGroup |
119 | 119 | */ |
120 | 120 | public function changeFileGroup( $file, $group, $recursive = false ) { |
121 | | - |
| 121 | + return false; |
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
Index: trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php |
— | — | @@ -42,7 +42,24 @@ |
43 | 43 | * @see Filesystem::changeFileGroup |
44 | 44 | */ |
45 | 45 | public function changeFileGroup( $file, $group, $recursive = false ) { |
| 46 | + if ( !$this->exists( $file ) ) { |
| 47 | + return false; |
| 48 | + } |
46 | 49 | |
| 50 | + // Not recursive, so just use chgrp. |
| 51 | + if ( !$recursive || !$this->is_dir($file) ) { |
| 52 | + return @chgrp( $file, $group ); |
| 53 | + } |
| 54 | + |
| 55 | + // Recursive approach required. |
| 56 | + $file = rtrim( $file, '/' ) . '/'; |
| 57 | + $files = $this->listDir( $file ); |
| 58 | + |
| 59 | + foreach ( $files as $fileName ) { |
| 60 | + $this->changeFileGroup( $file . $fileName, $group, $recursive ); |
| 61 | + } |
| 62 | + |
| 63 | + return true; |
47 | 64 | } |
48 | 65 | |
49 | 66 | /** |