From ceafe1bd522662108120131bcd2851c02443557d Mon Sep 17 00:00:00 2001 From: Xnot <28331593+Xnot@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:26:27 +0000 Subject: [PATCH] normalize path when passing args to windows filechooser --- plyer/platforms/win/filechooser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plyer/platforms/win/filechooser.py b/plyer/platforms/win/filechooser.py index 8a26fe3c..688b361d 100644 --- a/plyer/platforms/win/filechooser.py +++ b/plyer/platforms/win/filechooser.py @@ -12,7 +12,7 @@ import win32gui import win32con import pywintypes -from os.path import dirname, splitext, join, isdir +from os.path import dirname, splitext, join, isdir, normpath class Win32FileChooser: @@ -65,6 +65,7 @@ def run(self): args = {} if self.path: + self.path = normpath(self.path) if isdir(self.path): args["InitialDir"] = self.path else: