Skip to content

Commit

Permalink
Fixed SFTP mover bug that would leave escaped tmp files on the destin…
Browse files Browse the repository at this point in the history
…ation server.
  • Loading branch information
rolfm authored and theory committed Jun 5, 2010
1 parent fc9d361 commit 2983408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -41,6 +41,11 @@ C<LISTEN_PORT> or C<SSL_PORT> F<bricolage.conf> directives were anything other
than 80 and 443, respectively. Thanks to Héctor Daniel Cortés González for the
report. [David]

=item *

Fixed a bug where the SFTP mover would not properly finish moving the file,
leavingescaped tmp files on the destination server. [Matt Rolf]

=back

=head1 Version 2.0.0 (2010-04-12)
Expand Down
2 changes: 1 addition & 1 deletion lib/Bric/Util/Trans/SFTP.pm
Expand Up @@ -213,7 +213,7 @@ sub put_res {
$sftp->unlink($tmp_dest) if FTP_UNLINK_BEFORE_MOVE;
my $f = $ssh2->scp_put($src, $tmp_dest_esc);
$sftp->unlink($dest_file) if FTP_UNLINK_BEFORE_MOVE;
$sftp->rename($tmp_dest, $dest_file);
$sftp->rename($tmp_dest_esc, $dest_file);
};
unless (defined $status) {
my $msg = "Unable to put file '$dest_file' on remote host"
Expand Down

0 comments on commit 2983408

Please sign in to comment.