Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

Bric::Util::Trans::SFTP Escaping

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


david at kineticode

Jul 2, 2010, 1:16 PM

Post #1 of 2 (811 views)
Permalink
Bric::Util::Trans::SFTP Escaping

Hey Matt,

I'm refactoring Bric::Util::Trans::SFTP because it doesn't do error-handling properly. But I was wondering about this:

# Grab the base name and escape it.
my $orig_base = $fs->base_name($dest_file);
(my $escaped_base = $orig_base) =~ s/(.)/\\$1/g;

What is the point of the escaped version? Why backslash everything? This wasn't in the old version; look like you added it.

Thanks,

David


mattrolf at me

Jul 2, 2010, 1:57 PM

Post #2 of 2 (757 views)
Permalink
Re: Bric::Util::Trans::SFTP Escaping [In reply to]

IIRC, that was added in because it was the only way we could get the files to the server.  Feel free to try it without. 


-Matt

On 02 Jul, 2010,at 04:16 PM, "David E. Wheeler" <david [at] kineticode> wrote:

Hey Matt,

I'm refactoring Bric::Util::Trans::SFTP because it doesn't do error-handling properly. But I was wondering about this:

# Grab the base name and escape it.
my $orig_base = $fs->base_name($dest_file);
(my $escaped_base = $orig_base) =~ s/(.)/\\$1/g;

What is the point of the escaped version? Why backslash everything? This wasn't in the old version; look like you added it.

Thanks,

David

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.