Fix Open/Save As dialog starting location when file opened with relative path

The directory tree wasn't expanded because it was searching for e.g.
LICENSE.txt at the root of the filesystem (or perhaps AS the root?)
This commit is contained in:
Isaiah Odhner 2023-04-16 21:10:55 -04:00
parent 4ef6c07826
commit 728b4c53b9

View File

@ -1178,7 +1178,7 @@ if args.filename:
# else:
with open(args.filename, 'r') as my_file:
app.image = AnsiArtDocument.from_text(my_file.read())
app.filename = args.filename
app.filename = os.path.abspath(args.filename)
if args.clear_screen:
os.system("cls||clear")
if args.theme not in ["light", "dark"]: