Skip Menu |

This queue is for tickets about the Filesys-SmbClientParser CPAN distribution.

Report information
The Basics
Id: 24535
Status: new
Priority: 0/
Queue: Filesys-SmbClientParser

People
Owner: Nobody in particular
Requestors: Wade.Peeler [...] ngc.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SmbClientParser cannot cd into directories whose names consist of two characters
Date: Tue, 23 Jan 2007 15:45:03 -0700
To: <bug-Filesys-SmbClientParser [...] rt.cpan.org>
From: "Peeler, Wade M." <Wade.Peeler [...] ngc.com>
Distribution: Filesys::SmbClientParser-2.7 Perl version: 5.8.8 OS (uname -a output): Suse Linux ******** 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux When attempting to cd to any directory with a 2-character filename, it actually does a cd up one directory, just as if it had done a 'cd ..' It appears that the module has a regex matching /../ when it should match /\.\./ Code to reproduce: use strict; use Filesys::SmbClientParser; my $host = "my_computer"; my $smb; my $element; my @directory; my $dir1 = "abc"; my $dir2 = "ab"; print "$host\n"; $smb = new Filesys::SmbClientParser(); $smb->Host($host); $smb->User("my_user"); $smb->Password("my_password"); $smb->Share("my_share"); print "1st pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "1st directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } print "cding to $dir1\n"; $smb->cd($dir1); print "2nd pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "2nd directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } print "cding to $dir2\n"; $smb->cd($dir2); print "3rd pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "3rd directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } exit(0); Output: my_computer Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 1st pwd: \my_share\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 1st directory listing: . .. abc cding to abc Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 2nd pwd: \my_share\abc\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 2nd directory listing: . .. ab cding to ab Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 3rd pwd: \my_share\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 3rd directory listing: . .. abc
Subject: RE: [rt.cpan.org #24535] SmbClientParser cannot cd into directories whose names consist of two characters
Date: Tue, 23 Jan 2007 16:20:24 -0700
To: <bug-Filesys-SmbClientParser [...] rt.cpan.org>
From: "Peeler, Wade M." <Wade.Peeler [...] ngc.com>
Attached is a patch that I believe solves the problem. Show quoted text
-----Original Message----- From: Bugs in Filesys-SmbClientParser via RT [mailto:bug-Filesys-SmbClientParser@rt.cpan.org] Sent: Tuesday, January 23, 2007 3:46 PM To: Peeler, Wade M. Subject: [rt.cpan.org #24535] AutoReply: SmbClientParser cannot cd into directories whose names consist of two characters Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "SmbClientParser cannot cd into directories whose names consist of two characters", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #24535]. Your ticket is accessible on the web at: http://rt.cpan.org/Ticket/Display.html?id=24535 Please include the string: [rt.cpan.org #24535] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-Filesys-SmbClientParser@rt.cpan.org ------------------------------------------------------------------------ - Distribution: Filesys::SmbClientParser-2.7 Perl version: 5.8.8 OS (uname -a output): Suse Linux ******** 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux When attempting to cd to any directory with a 2-character filename, it actually does a cd up one directory, just as if it had done a 'cd ..' It appears that the module has a regex matching /../ when it should match /\.\./ Code to reproduce: use strict; use Filesys::SmbClientParser; my $host = "my_computer"; my $smb; my $element; my @directory; my $dir1 = "abc"; my $dir2 = "ab"; print "$host\n"; $smb = new Filesys::SmbClientParser(); $smb->Host($host); $smb->User("my_user"); $smb->Password("my_password"); $smb->Share("my_share"); print "1st pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "1st directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } print "cding to $dir1\n"; $smb->cd($dir1); print "2nd pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "2nd directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } print "cding to $dir2\n"; $smb->cd($dir2); print "3rd pwd: " . $smb->pwd . "\n"; @directory = $smb->dir; print "3rd directory listing:\n"; foreach $element (@directory) { print $element->{name} . "\n"; } exit(0); Output: my_computer Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 1st pwd: \my_share\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 1st directory listing: . .. abc cding to abc Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 2nd pwd: \my_share\abc\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 2nd directory listing: . .. ab cding to ab Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 3rd pwd: \my_share\ Domain=[NTDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] 3rd directory listing: . .. abc

Message body is not shown because sender requested not to inline it.