[XAM] Fixed issue with removing savefiles and searching for header in specific condition
This commit is contained in:
parent
a5d58a1243
commit
0949ebfb38
|
@ -263,8 +263,9 @@ X_RESULT ContentManager::WriteContentHeaderFile(const uint64_t xuid,
|
||||||
if (data.xuid == -1) {
|
if (data.xuid == -1) {
|
||||||
data.xuid = xuid;
|
data.xuid = xuid;
|
||||||
}
|
}
|
||||||
|
uint64_t used_xuid = (data.xuid != -1 && data.xuid != 0) ? data.xuid : xuid;
|
||||||
|
|
||||||
auto header_path = ResolvePackageHeaderPath(data.file_name(), xuid,
|
auto header_path = ResolvePackageHeaderPath(data.file_name(), used_xuid,
|
||||||
data.title_id, data.content_type);
|
data.title_id, data.content_type);
|
||||||
auto parent_path = header_path.parent_path();
|
auto parent_path = header_path.parent_path();
|
||||||
|
|
||||||
|
|
|
@ -521,20 +521,21 @@ DECLARE_XAM_EXPORT1(XamContentSetThumbnail, kContent, kImplemented);
|
||||||
dword_result_t XamContentDelete_entry(dword_t user_index,
|
dword_result_t XamContentDelete_entry(dword_t user_index,
|
||||||
lpvoid_t content_data_ptr,
|
lpvoid_t content_data_ptr,
|
||||||
lpunknown_t overlapped_ptr) {
|
lpunknown_t overlapped_ptr) {
|
||||||
if (user_index >= XUserMaxUserCount) {
|
uint64_t xuid = 0;
|
||||||
return X_ERROR_ACCESS_DENIED;
|
if (user_index != XUserIndexNone) {
|
||||||
}
|
const auto& user = kernel_state()->xam_state()->GetUserProfile(user_index);
|
||||||
|
|
||||||
const auto& user = kernel_state()->xam_state()->GetUserProfile(user_index);
|
if (!user) {
|
||||||
|
return X_ERROR_NO_SUCH_USER;
|
||||||
|
}
|
||||||
|
|
||||||
if (!user) {
|
xuid = user->xuid();
|
||||||
return X_ERROR_NO_SUCH_USER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XCONTENT_AGGREGATE_DATA content_data = *content_data_ptr.as<XCONTENT_DATA*>();
|
XCONTENT_AGGREGATE_DATA content_data = *content_data_ptr.as<XCONTENT_DATA*>();
|
||||||
|
|
||||||
auto result = kernel_state()->content_manager()->DeleteContent(user->xuid(),
|
auto result =
|
||||||
content_data);
|
kernel_state()->content_manager()->DeleteContent(xuid, content_data);
|
||||||
|
|
||||||
if (overlapped_ptr) {
|
if (overlapped_ptr) {
|
||||||
kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, result);
|
kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, result);
|
||||||
|
|
Loading…
Reference in New Issue