From: Mike G. v. a. <we...@ma...> - 2005-11-10 16:13:52
|
Log Message: ----------- Create the [HTML_TMP]/hardcopy directory if it doesn't exist. This is something of a hack done in Hardcopy.pm at the moment. I think this should be moved over to makeTempDirectory in Utils, but that would require more checking than I can do right at the moment. -- Mike Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: Hardcopy.pm Revision Data ------------- Index: Hardcopy.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v retrieving revision 1.72 retrieving revision 1.73 diff -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -u -r1.72 -r1.73 --- lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -417,7 +417,13 @@ my $eUserID = $r->param("effectiveUser"); # we want to make the temp directory web-accessible, for error reporting - my $temp_dir_parent_path = $ce->{courseDirs}{html_temp} . "/hardcopy"; # makeTempDirectory will ensure that .../hardcopy exists + my $temp_dir_parent_path = $ce->{courseDirs}{html_temp} . "/hardcopy"; + #FIXME + # ensure that .../hardcopy exists + unless (-w $temp_dir_parent_path) { + mkdir "$temp_dir_parent_path" + or die "Failed to create course directory $temp_dir_parent_path: $!\n"; + } my $temp_dir_path = eval { makeTempDirectory($temp_dir_parent_path, "work") }; if ($@) { $self->add_errors(CGI::escapeHTML($@)); |