re-do how protected files work, by default everything is writeable, aside from fs.

the design in now opt-out rather than opt-in.

for fs, it is still opt-in. this is because the risk of a user deciding to delete a file / folder in the filebrowser menu.
this can now be toggled in the the advanced options menu within filebrowser.
This commit is contained in:
ITotalJustice
2024-12-31 22:52:45 +00:00
parent c3b31d0fdd
commit d840a8ddba
8 changed files with 127 additions and 127 deletions

View File

@@ -533,11 +533,16 @@ Menu::Menu(const std::vector<NroEntry>& nro_entries) : MenuBase{"FileBrowser"_i1
}));
}
}
options->Add(std::make_shared<SidebarEntryBool>("Ignore read only"_i18n, m_ignore_read_only.Get(), [this](bool& v_out){
m_ignore_read_only.Set(v_out);
m_fs->SetIgnoreReadOnly(v_out);
}, "Yes"_i18n, "No"_i18n));
}));
}})
);
m_fs = std::make_unique<fs::FsNativeSd>();
m_fs = std::make_unique<fs::FsNativeSd>(m_ignore_read_only.Get());
fs::FsPath buf;
ini_gets("paths", "last_path", "/", buf, sizeof(buf), App::CONFIG_PATH);
m_path = buf;