Fix another LCS edge case that rev #0cc20d93ff50 introduced.
FossilOrigin-Name: fad37bc262de06f11c6e1c3a135a087a8683ac71122ec124bea5b22995d2bfad
This commit is contained in:
parent
6af0e0b41d
commit
6b7777f51c
1 changed files with 6 additions and 2 deletions
8
shelldap
8
shelldap
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
# vim: set nosta noet ts=4 sw=4:
|
||||
#
|
||||
# Copyright (c) 2006-2012, Mahlon E. Smith <mahlon@martini.nu>
|
||||
# Copyright (c) 2006-2013, Mahlon E. Smith <mahlon@martini.nu>
|
||||
# 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue