Change where !replay looks for its infile (#3129)

!fetch puts its output file into the output directory; it may be
beneficial to have !replay look in the output directory as well.
This commit is contained in:
Lincoln Stein 2023-04-06 22:02:06 -04:00 committed by GitHub
commit ab05144716
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -581,6 +581,7 @@ def do_command(command: str, gen, opt: Args, completer) -> tuple:
elif command.startswith("!replay"):
file_path = command.replace("!replay", "", 1).strip()
file_path = os.path.join(opt.outdir, file_path)
if infile is None and os.path.isfile(file_path):
infile = open(file_path, "r", encoding="utf-8")
completer.add_history(command)