[Linux] Crash if screenshots dir doesn't exist or is not executable #550
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cemu version:
b361b15
(latest, built withPORTABLE=OFF
)OS: Fedora 36
Description
Cemu crashes when taking a screenshot, if:
~/.local/share/Cemu/screenshots
does not exist OR is not executable.Cemu correctly errors but doesn't crash if:
Steps to reproduce
Repro 1: Dir does not exist
~/.local/share/Cemu/screenshots
if it existsRepro 2: Dir is not executable
Note the different error on line 2:
This should probably be
fs::create_directories(screendir.parent_path())
b361b154d8/src/Cafe/HW/Latte/Renderer/Renderer.cpp (L148)
b361b154d8/src/Cafe/HW/Latte/Renderer/Renderer.cpp (L105)
This is where the crash is when the dir. is not executable. There's a blank
std::error_code
above this so perhaps thenoexcept
version of fs::exists was meant to be used.Thanks! Confirmed fixed in every situation.