mirror of
https://github.com/Luca1991/NDSFactory.git
synced 2025-07-09 05:30:12 +02:00
Bugfix: check if file exists before overwrite
This commit is contained in:
parent
319d0e232e
commit
30425b6bb8
@ -1,6 +1,6 @@
|
|||||||
#ifndef REVISION_H
|
#ifndef REVISION_H
|
||||||
#define REVISION_H
|
#define REVISION_H
|
||||||
|
|
||||||
#define GIT_COMMIT_HASH "0b9b628"
|
#define GIT_COMMIT_HASH "319d0e2"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <cstdio>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "./../../mainwindow.h"
|
#include "./../../mainwindow.h"
|
||||||
#include "./../../ui_mainwindow.h"
|
#include "./../../ui_mainwindow.h"
|
||||||
@ -311,6 +312,8 @@ bool MainWindow::writeEverything(const std::string& savePath)
|
|||||||
else
|
else
|
||||||
paddingType = static_cast<char>('\xff');
|
paddingType = static_cast<char>('\xff');
|
||||||
|
|
||||||
|
std::remove(savePath.c_str());
|
||||||
|
|
||||||
res &= writeHeader(savePath);
|
res &= writeHeader(savePath);
|
||||||
res &= writeHeaderPadding(paddingType, savePath);
|
res &= writeHeaderPadding(paddingType, savePath);
|
||||||
res &= writeArm9Bin(savePath, isArm9FooterPresent);
|
res &= writeArm9Bin(savePath, isArm9FooterPresent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user