From a1844ff571d7dc4c7044dfa624ca9b8feef0fa68 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 30 May 2021 16:39:20 -0700 Subject: FILE:UPDATE-UNIX-TABLE: update lines whenever there's a match Bug fix. Previously, we were updating only in the special case of taking the source from the existing line, and otherwise just appending another copy of the entry. Signed-off-by: Sean Whitton --- src/property/file.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/property/file.lisp b/src/property/file.lisp index e4e0a3d..1bfda29 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -451,11 +451,11 @@ NO-SOURCE or \"PLACEHOLDER\", use the existing field value." and line-target = (nth target line-fields) for entry = (when-let* ((entry (gethash line-target pending)) (fields (fields entry))) - (and (member (nth source fields) - unknown :test #'string=) - (not (string= line-source no-source)) - (setf (nth source fields) line-source) - (format nil "~{~A~^ ~}" fields))) + (when (and (member (nth source fields) + unknown :test #'string=) + (not (string= line-source no-source))) + (setf (nth source fields) line-source)) + (format nil "~{~A~^ ~}" fields)) if entry collect it into accum and do (remhash line-target pending) else collect line into accum -- cgit v1.2.3