|
Lines 166-172
sub _change_directory {
Link Here
|
| 166 |
my ( $self, $remote_directory ) = @_; |
166 |
my ( $self, $remote_directory ) = @_; |
| 167 |
my $operation = "change_directory"; |
167 |
my $operation = "change_directory"; |
| 168 |
|
168 |
|
| 169 |
$self->{connection}->cwd($remote_directory) or return $self->_abort_operation($operation); |
169 |
$self->{connection}->cwd($remote_directory) or return $self->_abort_operation( $operation, $remote_directory ); |
| 170 |
|
170 |
|
| 171 |
$self->add_message( |
171 |
$self->add_message( |
| 172 |
{ |
172 |
{ |
|
Lines 289-295
sub _is_connected {
Link Here
|
| 289 |
} |
289 |
} |
| 290 |
|
290 |
|
| 291 |
sub _abort_operation { |
291 |
sub _abort_operation { |
| 292 |
my ( $self, $operation ) = @_; |
292 |
my ( $self, $operation, $path ) = @_; |
| 293 |
|
293 |
|
| 294 |
$self->add_message( |
294 |
$self->add_message( |
| 295 |
{ |
295 |
{ |
|
Lines 297-303
sub _abort_operation {
Link Here
|
| 297 |
type => 'error', |
297 |
type => 'error', |
| 298 |
payload => { |
298 |
payload => { |
| 299 |
detail => $self->{connection} ? $self->{connection}->status : '', |
299 |
detail => $self->{connection} ? $self->{connection}->status : '', |
| 300 |
error => $self->{connection} ? $self->{connection}->message : $@ |
300 |
error => $self->{connection} ? $self->{connection}->message : $@, |
|
|
301 |
path => $path ? $path : $self->{connection}->pwd, |
| 301 |
} |
302 |
} |
| 302 |
} |
303 |
} |
| 303 |
); |
304 |
); |
| 304 |
- |
|
|