diff --git a/pcsx2/DEV9/ATA/ATA_State.cpp b/pcsx2/DEV9/ATA/ATA_State.cpp index ecdfc78be4..6a42aefbc7 100644 --- a/pcsx2/DEV9/ATA/ATA_State.cpp +++ b/pcsx2/DEV9/ATA/ATA_State.cpp @@ -34,9 +34,7 @@ int ATA::Open(ghc::filesystem::path hddPath) CreateHDDinfo(config.HddSize); //Open File - if (ghc::filesystem::exists(hddPath)) - hddImage = ghc::filesystem::fstream(hddPath, std::ios::in | std::ios::out | std::ios::binary); - else + if (!ghc::filesystem::exists(hddPath)) { HddCreate hddCreator; hddCreator.filePath = hddPath; @@ -45,9 +43,8 @@ int ATA::Open(ghc::filesystem::path hddPath) if (hddCreator.errored) return -1; - - hddImage = ghc::filesystem::fstream(hddPath); } + hddImage = ghc::filesystem::fstream(hddPath, std::ios::in | std::ios::out | std::ios::binary); //Store HddImage size for later check hddImage.seekg(0, std::ios::end);