Lines 25-30
use File::Temp;
Link Here
|
25 |
use CGI qw ( -utf8 ); |
25 |
use CGI qw ( -utf8 ); |
26 |
use GD; |
26 |
use GD; |
27 |
use MIME::Base64; |
27 |
use MIME::Base64; |
|
|
28 |
use Cwd; |
29 |
|
28 |
use C4::Context; |
30 |
use C4::Context; |
29 |
use C4::Auth qw( get_template_and_user ); |
31 |
use C4::Auth qw( get_template_and_user ); |
30 |
use C4::Output qw( output_and_exit output_html_with_http_headers ); |
32 |
use C4::Output qw( output_and_exit output_html_with_http_headers ); |
Lines 213-225
sub handle_dir {
Link Here
|
213 |
my $dir_h; |
215 |
my $dir_h; |
214 |
opendir $dir_h, $dir; |
216 |
opendir $dir_h, $dir; |
215 |
while ( my $filename = readdir $dir_h ) { |
217 |
while ( my $filename = readdir $dir_h ) { |
216 |
$file = "$dir/$filename" |
218 |
|
217 |
if ( $filename =~ m/datalink\.txt/i |
219 |
if ( ($filename =~ m/datalink\.txt/i |
218 |
|| $filename =~ m/idlink\.txt/i ); |
220 |
|| $filename =~ m/idlink\.txt/i ) && ( -e "$dir/$filename" && !-l "$dir/$filename")) { |
|
|
221 |
$file = Cwd::abs_path("$dir/$filename"); |
222 |
} |
219 |
} |
223 |
} |
220 |
my $fh; |
224 |
my $fh; |
221 |
unless ( open( $fh, '<', $file ) ) { |
225 |
unless ( open( $fh, '<', $file ) ) { |
222 |
warn "Opening $dir/$file failed!"; |
226 |
warn "Opening $file failed!"; |
223 |
$direrrors{'OPNLINK'} = $file; |
227 |
$direrrors{'OPNLINK'} = $file; |
224 |
# This error is fatal to the import of this directory contents |
228 |
# This error is fatal to the import of this directory contents |
225 |
# so bail and return the error to the caller |
229 |
# so bail and return the error to the caller |
226 |
- |
|
|