summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index c4efd7d27..f6fe086c0 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -596,7 +596,12 @@ sub next_start {
sub load {
my ($hd, $file, $b_force) = @_;
- open(my $F, $file) or die N("Error reading file %s", $file);
+ my $F;
+ if (ref $file) {
+ $F = $file;
+ } else {
+ open($F, $file) or die N("Error reading file %s", $file);
+ }
my $h;
{