Skip to content

Fselect does not return file name when used with kdialog #24

@Stangoesagain

Description

@Stangoesagain

There's a bug in UI:Dialog module where fselect does not return selected file name when using kdialog (I'm on KDE5). It prints file name to the terminal, though. See the details in http://www.perlmonks.org?node_id=1161064

So far I narrowed it down to fselect sub in KDialog.pm. In this part:

my $command = $self->prepare_command
( $args, $fmt,
path => $self->make_kvl($args,($args->{'path'}||abs_path())),
filter => $self->make_kvl($args,($args->{'filter'}||'*'))
);

my ($rv,$selected) = $self->command_string($command);
$self->_post($args);
return($rv == 0 ? $selected : 0);

the line

my ($rv,$selected) = $self->command_string($command);

returns $rv value as 0 but does not assign any value to $selected, and that's when selected file name gets written to terminal instead.

When zenity is preferred fselect works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions