From df111c6157ad56b53c87eb2b20a6856eeea2d0fc Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 11 Oct 2023 13:14:30 +0100 Subject: [PATCH] JAL-629 Remove argfiles from the hashset of used argfiles once it has been used. More like (though not) a stack of argfiles --- src/jalview/bin/argparser/ArgParser.java | 4 ++++ src/jalview/bin/argparser/BootstrapArgs.java | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/jalview/bin/argparser/ArgParser.java b/src/jalview/bin/argparser/ArgParser.java index 1b8e6ad..155f69e 100644 --- a/src/jalview/bin/argparser/ArgParser.java +++ b/src/jalview/bin/argparser/ArgParser.java @@ -318,9 +318,13 @@ public class ArgParser } if (bsa != null) + { this.bootstrapArgs = bsa; + } else + { this.bootstrapArgs = BootstrapArgs.getBootstrapArgs(args); + } parse(args, initsubstitutions, allowPrivate); } diff --git a/src/jalview/bin/argparser/BootstrapArgs.java b/src/jalview/bin/argparser/BootstrapArgs.java index d32a5b2..5c21d03 100644 --- a/src/jalview/bin/argparser/BootstrapArgs.java +++ b/src/jalview/bin/argparser/BootstrapArgs.java @@ -214,6 +214,13 @@ public class BootstrapArgs } } } + + // if in an argfile, remove it from the hashset so it can be re-used in + // another argfile + if (inArgFile != null) + { + argFiles.remove(inArgFile); + } } public boolean contains(Arg a) -- 1.7.10.2