mirror of
https://github.com/Luca1991/NDSFactory.git
synced 2026-02-04 05:36:15 +01:00
Bugfix: check if file exists before overwrite
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <QDir>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include "./../../mainwindow.h"
|
||||
#include "./../../ui_mainwindow.h"
|
||||
@@ -311,6 +312,8 @@ bool MainWindow::writeEverything(const std::string& savePath)
|
||||
else
|
||||
paddingType = static_cast<char>('\xff');
|
||||
|
||||
std::remove(savePath.c_str());
|
||||
|
||||
res &= writeHeader(savePath);
|
||||
res &= writeHeaderPadding(paddingType, savePath);
|
||||
res &= writeArm9Bin(savePath, isArm9FooterPresent);
|
||||
|
||||
Reference in New Issue
Block a user