mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
IOS/FS: Move /tmp clearing back to the IPC interface
Prevents /tmp from being cleared unnecessarily; clearing /tmp is normally only done once every time IOS is reloaded.
This commit is contained in:
parent
f743f100b1
commit
0543598574
@ -84,12 +84,6 @@ Result<FileStatus> FileHandle::GetStatus() const
|
||||
return m_fs->GetFileStatus(*m_fd);
|
||||
}
|
||||
|
||||
void FileSystem::Init()
|
||||
{
|
||||
if (Delete(0, 0, "/tmp") == ResultCode::Success)
|
||||
CreateDirectory(0, 0, "/tmp", 0, {Mode::ReadWrite, Mode::ReadWrite, Mode::ReadWrite});
|
||||
}
|
||||
|
||||
Result<FileHandle> FileSystem::CreateAndOpenFile(Uid uid, Gid gid, const std::string& path,
|
||||
Modes modes)
|
||||
{
|
||||
|
@ -216,9 +216,6 @@ public:
|
||||
virtual Result<NandStats> GetNandStats() = 0;
|
||||
/// Get usage information about a directory (used cluster and inode counts).
|
||||
virtual Result<DirectoryStats> GetDirectoryStats(const std::string& path) = 0;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/IOS/FS/FileSystem.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
@ -37,6 +38,11 @@ constexpr size_t CLUSTER_DATA_SIZE = 0x4000;
|
||||
|
||||
FS::FS(Kernel& ios, const std::string& device_name) : Device(ios, device_name)
|
||||
{
|
||||
if (ios.GetFS()->Delete(PID_KERNEL, PID_KERNEL, "/tmp") == ResultCode::Success)
|
||||
{
|
||||
ios.GetFS()->CreateDirectory(PID_KERNEL, PID_KERNEL, "/tmp", 0,
|
||||
{Mode::ReadWrite, Mode::ReadWrite, Mode::ReadWrite});
|
||||
}
|
||||
}
|
||||
|
||||
void FS::DoState(PointerWrap& p)
|
||||
|
@ -103,7 +103,6 @@ bool HostFileSystem::FstEntry::CheckPermission(Uid caller_uid, Gid caller_gid,
|
||||
|
||||
HostFileSystem::HostFileSystem(const std::string& root_path) : m_root_path{root_path}
|
||||
{
|
||||
Init();
|
||||
ResetFst();
|
||||
LoadFst();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user