[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm
raeburn
raeburn at source.lon-capa.org
Sun Nov 12 18:04:24 EST 2017
raeburn Sun Nov 12 23:04:24 2017 EDT
Modified files:
/loncom/interface loncreatecourse.pm
Log:
- Use three-argument open() to separate file mode from the filename.
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.168 loncom/interface/loncreatecourse.pm:1.169
--- loncom/interface/loncreatecourse.pm:1.168 Sat Nov 4 01:12:19 2017
+++ loncom/interface/loncreatecourse.pm Sun Nov 12 23:04:23 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.168 2017/11/04 01:12:19 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.169 2017/11/12 23:04:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -901,7 +901,7 @@
if ($batchfilepath =~ m{^(\Q$dir/$defdom/web/$uname\_$udom\E)/pending/([^/]+)$}) {
my ($batchdir,$filename) = ($1,$2);
if (-e "$batchfilepath") {
- if (open(FILE,"<$batchfilepath")) {
+ if (open(FILE,"<",$batchfilepath)) {
my @buffer = <FILE>;
close(FILE);
if ((defined($filename)) && (defined($batchdir))) {
@@ -915,7 +915,7 @@
mkdir("$batchdir/processed", 0755);
}
if (-d "$batchdir/processed") {
- if (open(FILE,">$batchdir/processed/$filename")) {
+ if (open(FILE,">","$batchdir/processed/$filename")) {
print FILE @buffer;
close(FILE);
}
More information about the LON-CAPA-cvs
mailing list