fix irregurlar schema names like "my-schema.xsd" or "./my_import-schema.xsd" and replace it with underscore, so Delphi can handle this files

This commit is contained in:
Philipp Winkel 2021-03-19 11:39:22 +01:00
parent 57d49fa016
commit 4e5eb693cb
1 changed files with 3 additions and 1 deletions

View File

@ -1812,7 +1812,9 @@ begin
if OutputType = otMultiple then
begin
path := IncludeTrailingPathDelimiter(Result);
fileName := ASchemaName + '.pas';
fileName := ASchemaName.Replace('-', '_');
fileName := fileName.Replace('./', '');
fileName := fileName + '.pas';
if Assigned(FOnGetFileName) then
FOnGetFileName(Self, ASchemaName, path, fileName);