Skip to content

Commit 2820f15

Browse files
committed
replace opendir with pathname_opendir
1 parent 13665b5 commit 2820f15

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/LaTeXML/Post/LaTeXImages.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ sub convert_image {
528528

529529
sub DESTROY {
530530
if (my $tmpdir = File::Spec->tmpdir()) {
531-
if (pathname_d $tmpdir && opendir(my $tmpdir_fh, $tmpdir)) {
531+
if (pathname_d $tmpdir && pathname_opendir(my $tmpdir_fh, $tmpdir)) {
532532
my @empty_magick = grep { pathname_z $_ } map { "$tmpdir/$_" } readdir($tmpdir_fh);
533533
closedir($tmpdir_fh);
534534
pathname_unlink $_ foreach @empty_magick;

lib/LaTeXML/Util/Pack/Zip.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ sub get_archive {
7575
my ($directory, $whatsout) = @_;
7676
# Zip and send back
7777
my $archive = Archive::Zip->new();
78-
opendir(my $dirhandle, $directory)
78+
pathname_opendir(my $dirhandle, $directory)
7979
# TODO: Switch to Error API
8080
# or Fatal('expected', 'directory', undef,
8181
# "Expected a directory to archive '$directory':", $@);

lib/LaTeXML/Util/Pathname.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ sub candidate_pathnames {
430430
qr/^\Q$name\E\Q$ext\E$/]); } }
431431
# Now, combine; precedence to leading directories.
432432
foreach my $dir (@dirs) {
433-
opendir(my $dir_handle, $dir) or next;
433+
pathname_opendir(my $dir_handle, $dir) or next;
434434
my @dir_files = readdir($dir_handle);
435435
closedir($dir_handle);
436436
for my $local_file (@dir_files) {

lib/LaTeXML/Util/Test.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sub latexml_tests {
3131
if ($options{texlive_min} && (texlive_version() < $options{texlive_min})) {
3232
plan skip_all => "Requirement minimal texlive $options{texlive_min} not met.";
3333
return done_testing(); }
34-
if (!opendir($DIR, $directory)) {
34+
if (!pathname_opendir($DIR, $directory)) {
3535
# Can't read directory? Fail (assumed single) test.
3636
return do_fail($directory, "Couldn't read directory $directory:$!"); }
3737
else {

0 commit comments

Comments
 (0)