[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Sun Nov 5 14:04:44 EST 2017
raeburn Sun Nov 5 19:04:44 2017 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Use File::Path::remove_tree() instead of File::Path::Tiny::rm, given that
File::Path() is a core module in perl already used elsewhere in LON-CAPA.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1299 loncom/interface/loncommon.pm:1.1300
--- loncom/interface/loncommon.pm:1.1299 Sat Nov 4 20:40:57 2017
+++ loncom/interface/loncommon.pm Sun Nov 5 19:04:44 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1299 2017/11/04 20:40:57 raeburn Exp $
+# $Id: loncommon.pm,v 1.1300 2017/11/05 19:04:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -85,7 +85,7 @@
use MIME::Lite;
use MIME::Types;
use File::Copy();
-use File::Path::Tiny();
+use File::Path();
# ---------------------------------------------- Designs
use vars qw(%defaultdesign);
@@ -12660,7 +12660,7 @@
if (-f "$dir/$tempdir/$item") {
unlink("$dir/$tempdir/$item");
} elsif (-d "$dir/$tempdir/$item") {
- &File::Path::Tiny::rm("$dir/$tempdir/$item");
+ &File::Path::remove_tree("$dir/$tempdir/$item",{ safe => 1 });
}
}
}
@@ -12670,14 +12670,14 @@
if (-f "$dir/$item") {
unlink("$dir/$item");
} elsif (-d "$dir/$item") {
- &File::Path::Tiny::rm("$dir/$item");
+ &File::Path::remove_tree("$dir/$item",{ safe => 1 });
}
&File::Copy::move("$dir/$tempdir/$item","$dir/$item");
}
}
}
if (&File::Copy::move("$dir/$tempdir/$file","$dir/$file")) {
- &File::Path::Tiny::rm("$dir/$tempdir");
+ &File::Path::remove_tree("$dir/$tempdir",{ safe => 1 });
}
}
} else {
More information about the LON-CAPA-cvs
mailing list