forked from Mirror/GodMode9
Handle write permissions when build titlekey / seed db
This commit is contained in:
parent
8295a2eef2
commit
60e2479b16
@ -1669,6 +1669,10 @@ u32 BuildTitleKeyInfo(const char* path, bool dec, bool dump) {
|
||||
const char* path_in = path;
|
||||
UINT br;
|
||||
|
||||
// write permissions
|
||||
if (!CheckWritePermissions(path_out))
|
||||
return 1;
|
||||
|
||||
if (!path_in && !dump) { // no input path given - initialize
|
||||
memset(tik_info, 0, 16);
|
||||
if ((fvx_stat(path_out, NULL) == FR_OK) &&
|
||||
@ -1737,6 +1741,10 @@ u32 BuildSeedInfo(const char* path, bool dump) {
|
||||
u32 inputtype = 0; // 0 -> none, 1 -> seeddb.bin, 2 -> seed system save
|
||||
UINT br;
|
||||
|
||||
// write permissions
|
||||
if (!CheckWritePermissions(path_out))
|
||||
return 1;
|
||||
|
||||
if (!path_in && !dump) { // no input path given - initialize
|
||||
memset(seed_info, 0, 16);
|
||||
if ((fvx_stat(path_out, NULL) == FR_OK) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user