From 728b4c53b9c1f05403407443c76dfa92711de960 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Sun, 16 Apr 2023 21:10:55 -0400 Subject: [PATCH] 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?) --- paint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paint.py b/paint.py index 1bacdd4..b6e167e 100644 --- a/paint.py +++ b/paint.py @@ -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"]: