Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,26 @@
SetIconHandlerDefaultIcon(classesKey, associationClassName);
}
}
// On Win10 build 190042 ff it seems not to be enough to have an ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
// below the associationClassName, you also need it below the assiociation key itself
if ( serverType == ServerType.ShellPreviewHander )
{
using ( var classesKey = OpenClassesRoot(registrationType) )

Check warning on line 449 in SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs

View check run for this annotation

Codecov / codecov/patch

SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs#L449

Added line #L449 was not covered by tests
{
// For each one, create the server type key.
foreach ( var serverKeyPath in associationAttribute.Associations.
Select(association => GetKeyForServerType(association, serverType, serverName)) )
{
using ( var serverKey = classesKey.CreateSubKey(serverKeyPath) )

Check warning on line 455 in SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs

View check run for this annotation

Codecov / codecov/patch

SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs#L455

Added line #L455 was not covered by tests
{
// If we failed to craete the server key, that's a big problem.
if ( serverKey == null ) throw new InvalidOperationException($"Failed to create server key at '{serverKeyPath}'.");
// Set the server CLSID.
serverKey.SetValue(null, serverClsid.ToRegistryString());
}

Check warning on line 461 in SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs

View check run for this annotation

Codecov / codecov/patch

SharpShell/SharpShell/ServerRegistration/ServerRegistrationManager.cs#L460-L461

Added lines #L460 - L461 were not covered by tests
}
}
}
}
}

Expand Down