Skip to content

Commit

Permalink
fix bug with 2-arg open(>>)
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Jan 7, 2025
1 parent 6f714da commit 5b3cc01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Prima/Dialog/FileDialog.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ sub Open_Click
}
if ( !$self-> {openMode} && !$self-> {noTestFileCreate}) {
my $file;
if ( open $file, ">>$_") {
if ( open $file, ">>", $_) {
close $file;
} else {
Prima::MsgBox::message_box( $self-> text, "Cannot create file $_: $!", mb::OK | mb::Error);
Expand Down
2 changes: 1 addition & 1 deletion Prima/sys/FS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sub open(*;$*)
my $flags;
my @layers;

if ( $mode =~ /^([^:\s]+)(.+)$/ ) {
if ( $mode =~ /^([^:\s]+)([:\s].*)$/ ) {
$mode = $1;
my $binmode = $2;
$binmode =~ s/^\s+//;
Expand Down

0 comments on commit 5b3cc01

Please sign in to comment.