Skip to content

Commit

Permalink
don't mengle file and limit filename identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
bigerl authored Sep 13, 2024
1 parent c7c97c2 commit cf8644b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ public QueryHandler(Config config) throws IOException {
private QueryList initializeTemplateQueryHandler(QuerySource templateSource) throws IOException {
QuerySource querySource = templateSource;
final var originalPath = templateSource.getPath();
final var postfix = String.format("_instances_%s.txt",
Integer.toUnsignedString(this.config.template.endpoint.hashCode() + (int) this.config.template.limit.longValue()));
final var postfix = String.format("_instances_f%s_l%s.txt",
Integer.toUnsignedString(this.config.template.endpoint.hashCode()), Integer.toUnsignedString((int) this.config.template.limit.longValue()));
final Path instancePath = Files.isDirectory(originalPath) ?
originalPath.resolveSibling(originalPath.getFileName() + postfix) : // if the source of the query templates is a folder, the instances will be saved in a file with the same name as the folder
originalPath.resolveSibling(originalPath.getFileName().toString().split("\\.")[0] + postfix); // if the source of the query templates is a file, the instances will be saved in a file with the same name as the file
Expand Down

0 comments on commit cf8644b

Please sign in to comment.