Skip to content

Commit

Permalink
fix: fix error when file in project without directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnkwlp committed Sep 6, 2023
1 parent 46b8873 commit 9aa2c5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AbpProjectTools/Services/TypeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public EntityDefinitions GetDomain(string name, bool includeDomainProperties = f
TypeNamespace = findType.Namespace,
FileDirectory = csFile.DirectoryName,
FileFullName = csFile.FullName,
FileProjectPath = csFile.DirectoryName.Substring(domainProject.FullName.Length + 1),
FileProjectPath = csFile.DirectoryName == domainProject.FullName ? "" : csFile.DirectoryName.Substring(domainProject.FullName.Length + 1),
Properties = typeProperties,
ConstructorWithId = hasConstructorWithId,
PropertyNamespaces = typeNamespaces,
Expand Down Expand Up @@ -332,7 +332,7 @@ public AppServiceContractDefinition GetAppContractService(string name)
ServiceName = appServiceType.Name[1..],
Name = appServiceType.Name[1..].Replace("AppService", null),
Namespace = appServiceType.Namespace,
FileProjectPath = csFile.DirectoryName.Substring(appContractProject.FullName.Length + 1),
FileProjectPath = csFile.DirectoryName == appContractProject.FullName ? "" : csFile.DirectoryName.Substring(appContractProject.FullName.Length + 1),
Methods = methods.ToList(),
};
}
Expand Down

0 comments on commit 9aa2c5d

Please sign in to comment.