--- loncom/imspackages/imsimportdocs.pm 2014/12/11 00:35:53 1.34 +++ loncom/imspackages/imsimportdocs.pm 2017/11/05 20:04:30 1.36 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: imsimportdocs.pm,v 1.34 2014/12/11 00:35:53 raeburn Exp $ +# $Id: imsimportdocs.pm,v 1.36 2017/11/05 20:04:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::imsprocessor; use LONCAPA::map(); use lib '/home/httpd/lib/perl/'; use LONCAPA; +use File::Path(); use strict; @@ -396,10 +397,6 @@ sub display_two { my $folder = $env{'form.folder'}; my $cms = $env{'form.source'}; my $tempdir = $env{'form.tempdir'}; - my $longcrs = ''; - if ($crs =~ m/^(\d)(\d)(\d)/) { - $longcrs = $1.'/'.$2.'/'.$3.'/'.$crs; - } my %importareas = (); my %includedres = (); my %includeditems = (); @@ -548,7 +545,7 @@ sub display_two { } } if ($tempdir =~ m/^\/home\/httpd\/perl\/tmp\/$crs\/\d{10}/) { - system("rm -r -f $tempdir"); + &File::Path::remove_tree($tempdir,{ safe => 1 }); } # All done, display success message