Subject: | Filesys::SmbClientParser::dir() function does not quote the $dir argument |
Hi! When supplying a directory name to the
Filesys::SmbClientParser::dir() function in Filesys-SmbClientParser-2.5
Smbclient did not quote the directory name, resulting in unexpected
behaviour when the directorty name contained spaces. The attached patch
seems to solve the problem.
--- SmbClientParser.pm.orig Tue Nov 12 19:53:44 2002
+++ SmbClientParser.pm Wed Oct 29 17:45:21 2003
@@ -298,7 +298,7 @@
my $self = shift;
my $dir = shift;
my (@dir,@files);
- if (!$dir) {$dir=$self->{DIR};}
+ if (!$dir) {$dir=$self->{DIR};} else { $dir = "\"$dir\""; }
my $cmd = "ls $dir/*";
$self->operation($cmd,undef,@_) || return undef;
my $out = $self->LastResponse;