summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsamba_wizard/Samba.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index 91d138d4..0c8ee6e3 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -334,14 +334,7 @@ sub list_printers {
my @list if 0;
return @list if @list;
- @list = sort grep { /^(?!#).+/ } map {
- split(':', $_)->[0];
- } cat_("/etc/printcap");
- if (@list) {
- @list
- } else {
- ()
- }
+ sort grep { ! /^#/ } map { /([^:]*):/ and $1 } cat_("/etc/printcap");
}