[XAM] Fixed issue with XamContentCreate reassigning already assigned symlinks
This commit is contained in:
committed by
Radosław Gliński
parent
bc69b95db6
commit
9bfaff5040
@@ -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*>();
|
||||
|
||||
Reference in New Issue
Block a user