From 4e9b45a917bf4f17704724eb53b9124d4a83365a Mon Sep 17 00:00:00 2001 From: Sanjula Date: Wed, 3 Jul 2024 13:59:17 -0400 Subject: [PATCH] Check preUsrlibl and postUsrlibl before adding to library list Signed-off-by: Sanjula --- src/iproject.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/iproject.ts b/src/iproject.ts index 1d0ec930..a3ef6fea 100644 --- a/src/iproject.ts +++ b/src/iproject.ts @@ -1017,8 +1017,12 @@ export class IProject { if (unresolvedState && state) { if (unresolvedState[position] && state[position]) { - if (state[position]!.includes(library)) { - window.showErrorMessage(l10n.t('{0} already exists in {1}', library, position)); + if (state['preUsrlibl']!.includes(library)) { + window.showErrorMessage(l10n.t('{0} already exists in {1}', library, 'preUsrlibl')); + return; + + } else if (state['postUsrlibl']!.includes(library)) { + window.showErrorMessage(l10n.t('{0} already exists in {1}', library, 'postUsrlibl')); return; } else {