input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.
This commit is contained in:
Morph
2021-05-08 12:53:21 -04:00
parent 24848a413a
commit 8749b58c05

View File

@@ -31,6 +31,10 @@ std::filesystem::path GetNameWithoutExtension(std::filesystem::path filename) {
InputProfiles::InputProfiles() {
const auto input_profile_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input";
if (!FS::IsDir(input_profile_loc)) {
return;
}
FS::IterateDirEntries(
input_profile_loc,
[this](const std::filesystem::path& full_path) {