diff --git a/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_types.hpp b/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_types.hpp index dcfd85c9..2b1ec983 100644 --- a/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_types.hpp +++ b/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_types.hpp @@ -21,6 +21,7 @@ namespace ams::erpt::srv { constexpr inline const char ReportOnSdStoragePath[] = "ersd"; + constexpr inline const char ReportOnSdStorageRootDirectoryPath[] = "ersd:/"; constexpr inline const char ReportStoragePath[] = "save"; constexpr inline const char JournalFileName[] = "save:/journal"; diff --git a/libstratosphere/source/erpt/srv/erpt_srv_main.cpp b/libstratosphere/source/erpt/srv/erpt_srv_main.cpp index affc0b45..c3bb485f 100644 --- a/libstratosphere/source/erpt/srv/erpt_srv_main.cpp +++ b/libstratosphere/source/erpt/srv/erpt_srv_main.cpp @@ -88,7 +88,7 @@ namespace ams::erpt::srv { s64 report_count = MinimumReportCountForCleanup; fs::DirectoryHandle dir; - if (R_SUCCEEDED(fs::OpenDirectory(std::addressof(dir), ReportOnSdStoragePath, fs::OpenDirectoryMode_All))) { + if (R_SUCCEEDED(fs::OpenDirectory(std::addressof(dir), ReportOnSdStorageRootDirectoryPath, fs::OpenDirectoryMode_All))) { ON_SCOPE_EXIT { fs::CloseDirectory(dir); }; if (R_FAILED(fs::GetDirectoryEntryCount(std::addressof(report_count), dir))) { @@ -97,7 +97,7 @@ namespace ams::erpt::srv { } if (report_count >= MinimumReportCountForCleanup) { - fs::CleanDirectoryRecursively(ReportOnSdStoragePath); + fs::CleanDirectoryRecursively(ReportOnSdStorageRootDirectoryPath); } }