[system] / trunk / pg / lib / WeBWorK / PG / IO.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/WeBWorK/PG/IO.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6260 Revision 6261
192=cut 192=cut
193 193
194sub createDirectory { 194sub createDirectory {
195 my ($dirName, $permission, $numgid) = @_; 195 my ($dirName, $permission, $numgid) = @_;
196 $permission = (defined($permission)) ? $permission : '0770'; 196 $permission = (defined($permission)) ? $permission : '0770';
197 # FIXME -- find out where the permission is supposed to be defined. 197 # FIXME -- find out where the permission is supposed to be defined
198 #warn "dirName is $dirName and permission is $permission"; 198 my $errors = '';
199 mkdir($dirName, $permission) 199 mkdir($dirName, $permission)
200 or warn "Can't do mkdir($dirName, $permission): $!"; 200 or $errors .= "Can't do mkdir($dirName, $permission): $!\n".caller(3);
201 chmod($permission, $dirName) 201 chmod($permission, $dirName)
202 or warn "Can't do chmod($permission, $dirName): $!"; 202 or $errors .= "Can't do chmod($permission, $dirName): $!\n".caller(3);
203 unless ($numgid == -1) { 203 unless ($numgid == -1) {
204 chown(-1,$numgid,$dirName) 204 chown(-1,$numgid,$dirName)
205 or warn "Can't do chown(-1,$numgid,$dirName): $!"; 205 or $errors .= "Can't do chown(-1,$numgid,$dirName): $!\n".caller(3);
206 }
207 if ($errors) {
208 warn $errors;
209 return 0;
210 } else {
211 return 1;
206 } 212 }
207} 213}
208 214
209=back 215=back
210 216

Legend:
Removed from v.6260  
changed lines
  Added in v.6261

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9