derrod / legendary

Legendary - A free and open-source replacement for the Epic Games Launcher
https://legendary.gl/discord
GNU General Public License v3.0
4.64k stars 165 forks source link

Legendary fails to create any new file or directory #354

Closed AnErrupTion closed 3 years ago

AnErrupTion commented 3 years ago

Platform

Operating system and version: Arch Linux Legendary version (legendary -V): legendary version "0.20.14", codename "Nova Prospekt"

Expected Behavior

Games should install properly and I should not have to create the ~/legendary folder.

Current Behavior

When trying to install a game (here Rocket League, but should apply to any game), I first get an error telling me that the legendary folder in my home directory is not present. I find it weird that legendary didn't create it itself, so I did it. After that, when I try again, the game downloads, but the FileWorker always gives me errors that the files of the game can't be written to disk. Here is an example message:

[DLManager] INFO: = Progress: 38.98% (8181/20990), Running for 00:01:17, ETA: 00:02:00
[DLManager] INFO:  - Downloaded: 3245.47 MiB, Written: 4529.71 MiB
[DLManager] INFO:  - Cache usage: 72.0 MiB, active tasks: 16
[DLManager] INFO:  + Download   - 40.49 MiB/s (raw) / 45.95 MiB/s (decompressed)
[DLManager] INFO:  + Disk   - 15.47 MiB/s (write) / 3.00 MiB/s (read)
[DLManager] CRITICAL: Writing for TAGame/CookedPCConsole/Skin_MuscleCar_FCB_Esports_SF.upk.tmp failed!
[DLManager] CRITICAL: Writing for TAGame/CookedPCConsole/Skin_MuscleCar_FCB_Esports_SF.upk failed!
[FileWorker] ERROR: Removing file failed: FileNotFoundError(2, 'No such file or directory')
[FileWorker] WARNING: Something in writing a file failed: FileNotFoundError(2, 'No such file or directory')
[FileWorker] ERROR: Removing file failed: FileNotFoundError(2, 'No such file or directory')

Steps to Reproduce

  1. Install a game, for example legendary install Sugar

Additional information

My SSD is fine, I can write files and directories to it, and this issue never happened before.

derrod commented 3 years ago

Legendary creates all the folders in the path it writes to, given that it couldn't do that, and that writing the file fails I'm chalking this up to a permissions issue.

derrod commented 3 years ago

So based on the conversation on Discord legendary somehow ended up in a weird state where it didn't check whether or not the install directory even existed and just failed to create it again.

The initial submission here is still incorrect in the sense that the reproduction steps and erroe description are wrong, but there is an issue here that will require investigating.

AnErrupTion commented 3 years ago

Deleting the config folder ~/.config/legendary did solve the problem.

derrod commented 3 years ago

With commit 74bc2fecc0dba9349b5dfe1f598914a129c3c169 attempting to start an installation if the conditions causing this issue are present (game folder deleted, but not uninstalled) will show an error and abort.