Skip to content

Commit

Permalink
Use a temp dir for our temp files and ensure we have absolute paths
Browse files Browse the repository at this point in the history
Without absolute paths, scp may interpret filenames with colons as
host:path specs.
  • Loading branch information
tsibley committed Aug 30, 2011
1 parent 89f5476 commit 19a9683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/App/Nopaste/Service/ssh.pm
Expand Up @@ -37,8 +37,9 @@ sub run {
TEMPLATE => "${date}XXXXXXXX",
SUFFIX => $suffix,
UNLINK => 1,
TMPDIR => 1,
);
my $filename = $tmp->filename;
my $filename = File::Spec->rel2abs($tmp->filename);

print $tmp $args{text}
or return (0, "Can't write to tempfile $filename");
Expand Down

0 comments on commit 19a9683

Please sign in to comment.