Skip to content

Commit

Permalink
Don't try to utime an open file
Browse files Browse the repository at this point in the history
6407f65 changed to using File::Temp to create the temp file
for this test, which implicitly opens it for exclusive access on
VMS and prevents the ability to call utime on it. The filehandle
is not used so just close it.
  • Loading branch information
craigberry committed Aug 20, 2024
1 parent 3eed106 commit 8b6e470
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/utime.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use autodie;
use File::Temp qw(tempfile);

my ($fh, $filename) = tempfile;
close $fh; # may not be able to utime an open file

eval { utime(undef, undef, NO_SUCH_FILE); };
isa_ok($@, 'autodie::exception', 'exception thrown for utime');
Expand Down

0 comments on commit 8b6e470

Please sign in to comment.