MiSTer-devel / Downloader_MiSTer

Tool for installing and updating MiSTer cores and other files
GNU General Public License v3.0
112 stars 15 forks source link

Failure to remove directory when using retronas and MiSTer #22

Closed jonasrosland closed 2 years ago

jonasrosland commented 2 years ago

I opened an issue for this over in the retronas repo, but it might be better suited here.

Copy/paste from the original issue:


Hi!

Just getting started with retronas, and connected my MiSTer setup to it over CIFS. When I run downloader.sh, it tries to remove the empty folder for ATARI2600, but ends up failing:

Deleting empty folder /media/fat/games/ATARI2600
Traceback (most recent call last):
  File "/tmp/dont_download.zip/downloader/main.py", line 37, in main
    exit_code = execute_full_run(
  File "/tmp/dont_download.zip/downloader/main.py", line 57, in execute_full_run
    exit_code = runner.full_run()
  File "/tmp/dont_download.zip/downloader/full_run_service.py", line 59, in full_run
    result = self._full_run_impl()
  File "/tmp/dont_download.zip/downloader/full_run_service.py", line 121, in _full_run_impl
    self._online_importer.download_dbs_contents(importer_command, full_resync)
  File "/tmp/dont_download.zip/downloader/online_importer.py", line 108, in download_dbs_contents
    self._remove_folders(importer_command)
  File "/tmp/dont_download.zip/downloader/online_importer.py", line 210, in _remove_folders
    system_file_system.remove_folder(full_folder_path)
  File "/tmp/dont_download.zip/downloader/file_system.py", line 239, in remove_folder
    os.rmdir(self._path(path))
NotADirectoryError: [Errno 20] Not a directory: '/media/fat/games/ATARI2600'

This makes the rest of the update/download fail as well. Creating an empty file in the ATARI2600 folder removes this failure point.

theypsilon commented 2 years ago

Hey! I introduced some change related to this. Could you please try again now?

theypsilon commented 2 years ago

Considering it fixed. Please reopen if you anybody still sees this problem.