Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 95b84d4

Browse files
fix fileName comparison in MoveTypeToFileContextAction
1 parent 9142230 commit 95b84d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/MoveTypeToFileContextAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public override async Task<bool> IsAvailableAsync(EditorRefactoringContext conte
4747
SyntaxTree st = await context.GetSyntaxTreeAsync().ConfigureAwait(false);
4848
Identifier identifier = (Identifier)st.GetNodeAt(context.CaretLocation, node => node.Role == Roles.Identifier);
4949
if (identifier == null) return false;
50-
if (MakeValidFileName(identifier.Name).Equals(Path.GetFileNameWithoutExtension(context.FileName), StringComparison.OrdinalIgnoreCase))
50+
if (MakeValidFileName(identifier.Name).Equals(Path.GetFileName(context.FileName), StringComparison.OrdinalIgnoreCase))
5151
return false;
5252
if (identifier.Parent.Parent is TypeDeclaration)
5353
return false;

0 commit comments

Comments
 (0)