-
Bug
-
Resolution: Fixed
-
Normal
-
2.0.2
-
None
-
openSUSE Tumbleweed
This happens when running "picard ." on a directory that was removed because the files were saved and moved to a different location. The backtrace:
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/picard/ui/options/renaming.py", line 130, in check_formats
self.update_examples()
File "/usr/lib64/python3.6/site-packages/picard/ui/options/renaming.py", line 162, in update_examples
example1 = self._example_to_filename(self.example_1())
File "/usr/lib64/python3.6/site-packages/picard/ui/options/renaming.py", line 148, in _example_to_filename
filename = file._make_filename(file.filename, file.metadata, settings)
File "/usr/lib64/python3.6/site-packages/picard/file.py", line 358, in _make_filename
config.setting['windows_compatibility_drive_root'])
File "/usr/lib64/python3.6/site-packages/picard/util/filenaming.py", line 307, in make_short_filename
basedir = os.path.abspath(basedir)
File "/usr/lib64/python3.6/posixpath.py", line 376, in abspath
cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
Aborted (core dumped)
The way to reproduce it:
mkdir foo cd foo picard .
Now on a different terminal, do
rmdir foo
And on picard, open the Options dialog. Picard will crash due to a call to os.getcwd() raising an exception inside os.path.abspath/realpath .