test_smbclient_tarmode.pl: samba 3.6.9 can print a empty attribute string
authorAurélien Aptel <aurelien.aptel@gmail.com>
Mon, 15 Jul 2013 17:04:43 +0000 (19:04 +0200)
committerJim McDonough <jmcd@samba.org>
Tue, 5 Nov 2013 13:42:41 +0000 (08:42 -0500)
While changing my setup, I discovered that for some unknown reasons
samba (serv/client) doesn't print any attributes for normal files.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
source3/script/tests/test_smbclient_tarmode.pl

index 6fa1ae885af8374b40673a318e679e902988ab36..a5b061ec10a97531367edfb5c4e61e66c55919d8 100755 (executable)
@@ -1260,7 +1260,7 @@ sub list {
     my $out = main::smb_client('-D', $path, '-c', 'ls');
 
     for(split /\n/, $out) {
-        next if !/^  (.+?)\s+([AHSRDN]+)\s+(\d+)\s+(.+)/o;
+        next if !/^  (.+?)\s+([AHSRDN]*)\s+(\d+)\s+(.+)/o;
         my ($fn, $attr, $size, $date) = ($1, $2, $3, $4);
         next if $fn =~ /^\.{1,2}$/;