mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Windows: Fix regression causing error when choosing save file names
Fixes #1902247 [Error when exporting files from Edit book](https://bugs.launchpad.net/calibre/+bug/1902247)
This commit is contained in:
parent
0035170828
commit
b7e6b8fbee
@ -227,7 +227,11 @@ def run_file_dialog(
|
||||
|
||||
def fix_path(x):
|
||||
u = os.path.abspath(x.decode('utf-8'))
|
||||
return get_long_path_name(u)
|
||||
try:
|
||||
return get_long_path_name(u)
|
||||
except FileNotFoundError:
|
||||
base, fn = os.path.split(u)
|
||||
return os.path.join(get_long_path_name(base), fn)
|
||||
|
||||
ans = tuple(map(fix_path, parts[1:]))
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user