Skip to content

Commit

Permalink
Merge pull request #577 from Unrud/fix/check-disk-space
Browse files Browse the repository at this point in the history
Check disk space in the nearest existing directory
  • Loading branch information
sharkwouter authored Jul 30, 2023
2 parents 79b6d72 + 2f75597 commit 6eebdf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Add notifications on successful download and installation of games (thanks to orende)
- Add category filtering dialog for game library (thanks to orende)
- Parallelize api.can_connect function with threads, futures (thanks to orende)
- Fix available disk space being checked in parent directory (thanks to Unrud)

**1.2.2**
- Fix progress bar not showing up for downloads
Expand Down
3 changes: 2 additions & 1 deletion minigalaxy/ui/gametile.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def __download_game(self) -> None:

def __download(self, download_info, download_type, finish_func, cancel_to_state): # noqa: C901
download_success = True
self.game.set_install_dir(self.config.install_dir)
GLib.idle_add(self.update_to_state, State.QUEUED)

# Need to update the config with DownloadType metadata
Expand Down Expand Up @@ -295,7 +296,7 @@ def __download(self, download_info, download_type, finish_func, cancel_to_state)
download_files.insert(0, download)
self.download_list.extend(download_files)

if check_diskspace(total_file_size, self.config.install_dir):
if check_diskspace(total_file_size, self.game.install_dir):
self.download_manager.download(download_files)
ds_msg_title = ""
ds_msg_text = ""
Expand Down
3 changes: 2 additions & 1 deletion minigalaxy/ui/gametilelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def __download_game(self) -> None:

def __download(self, download_info, download_type, finish_func, cancel_to_state): # noqa: C901
download_success = True
self.game.set_install_dir(self.config.install_dir)
GLib.idle_add(self.update_to_state, State.QUEUED)

# Need to update the config with DownloadType metadata
Expand Down Expand Up @@ -301,7 +302,7 @@ def __download(self, download_info, download_type, finish_func, cancel_to_state)
download_files.insert(0, download)
self.download_list.extend(download_files)

if check_diskspace(total_file_size, self.config.install_dir):
if check_diskspace(total_file_size, self.game.install_dir):
self.download_manager.download(download_files)
ds_msg_title = ""
ds_msg_text = ""
Expand Down

0 comments on commit 6eebdf1

Please sign in to comment.