- # make it fail by creating a directory of the backup name
- mkdir "$work.bak" or die "Cannot make mask backup directory: $!";
+ if ($^O eq 'VMS') {
+ # make it fail by creating a .bak file with a version than which no higher can be created
+ # can't make a directory because foo.bak and foo^.bak.DIR do not conflict.
+ open my $fh, '>', "$work.bak;32767" or die "Cannot make mask backup file: $!";
+ close $fh or die "Failed to close: $!";
+ }
+ else {
+ # make it fail by creating a directory of the backup name
+ mkdir "$work.bak" or die "Cannot make mask backup directory: $!";
+ }