[XAM] Fixed issue with XamContentCreate reassigning already assigned symlinks

This commit is contained in:
Gliniak
2026-02-17 22:57:31 +01:00
committed by Radosław Gliński
parent bc69b95db6
commit 9bfaff5040
9 changed files with 43 additions and 12 deletions

View File

@@ -244,6 +244,16 @@ dword_result_t xeXamContentCreate(dword_t user_index, lpstring_t root_name,
return X_ERROR_INVALID_NAME;
}
// Check if we have something under provided symlink.
std::string symlink_path = root_name.value();
if (!symlink_path.ends_with(':')) {
symlink_path += ':';
}
if (kernel_state()->file_system()->IsSymbolicLinkRegistered(symlink_path)) {
return X_ERROR_INVALID_PARAMETER;
}
XCONTENT_AGGREGATE_DATA content_data;
if (content_data_size == sizeof(XCONTENT_DATA)) {
content_data = *content_data_ptr.as<XCONTENT_DATA*>();