From 6b7777f51c51f09f33c0bef875059d52d5b8ddca Mon Sep 17 00:00:00 2001 From: "mahlon@laika.com" Date: Fri, 26 Apr 2013 22:52:02 +0000 Subject: [PATCH] Fix another LCS edge case that rev #0cc20d93ff50 introduced. FossilOrigin-Name: fad37bc262de06f11c6e1c3a135a087a8683ac71122ec124bea5b22995d2bfad --- shelldap | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shelldap b/shelldap index e0afa80..40423e6 100755 --- a/shelldap +++ b/shelldap @@ -1,7 +1,7 @@ #!/usr/bin/env perl # vim: set nosta noet ts=4 sw=4: # -# Copyright (c) 2006-2012, Mahlon E. Smith +# Copyright (c) 2006-2013, Mahlon E. Smith # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -1618,6 +1618,10 @@ sub run_edit # foreach ( $diff->Items(1) ) { my ( $attr, $val ) = $parse->( $_ ) or next; + my $cur_vals = $e->get_value( $attr, asref => 1 ) || []; + my $cur_valcount = scalar @$cur_vals; + + next if $cur_valcount == 1; next if $seen_attr{ $attr }; $self->debug("DELETE: $_"); $e->delete( $attr => [ $val ] ); @@ -2157,7 +2161,7 @@ use strict; use warnings; $0 = 'shelldap'; -my $VERSION = '1.0.1'; +my $VERSION = '1.0.2'; use Getopt::Long; use YAML::Syck;