Skip to content

Commit e4a9cec

Browse files
authored
Improve path processing (#336)
* Refs #20755: Normalize paths Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Update idl-parser submodule Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --------- Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
1 parent 1b82d29 commit e4a9cec

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/com/eprosima/fastdds/fastddsgen.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public fastddsgen(
157157

158158
if (!arg.startsWith("-"))
159159
{
160-
m_idlFiles.add(arg);
160+
m_idlFiles.add(Paths.get(arg).normalize().toString());
161161
}
162162
else if (arg.equals("-example"))
163163
{
@@ -230,7 +230,7 @@ else if (arg.equals("-extrastg"))
230230
{
231231
throw new BadArgumentException("Missing arguments for -extrastg");
232232
}
233-
}
233+
}
234234
else if (arg.equals("-ppDisable"))
235235
{
236236
m_ppDisable = true;
@@ -382,7 +382,7 @@ public boolean execute()
382382
getVersion(), m_publishercode, m_subscribercode);
383383

384384
// Load string templates
385-
System.out.println("Loading templates from " + System.getProperty("java.class.path"));
385+
System.out.println("Loading templates from " + System.getProperty("java.class.path"));
386386
// Add path of custom templates to manager search path
387387
String extraPaths = "";
388388
for (Map.Entry<String, String> entry : m_customStgOutput.entrySet())
@@ -397,7 +397,7 @@ public boolean execute()
397397
extraPaths += ":./";
398398
}
399399
}
400-
400+
401401
String templatePaths = "com/eprosima/fastdds/idl/templates:com/eprosima/fastcdr/idl/templates" + extraPaths;
402402
System.out.println("Template resource folders: " + templatePaths);
403403
TemplateManager.setGroupLoaderDirectories(templatePaths);
@@ -734,7 +734,7 @@ private Project parseIDL(
734734
tmanager.addGroup("TypesSwigInterface");
735735
tmanager.addGroup("DDSPubSubTypeSwigInterface");
736736
}
737-
737+
738738
// Load custom templates into manager
739739
if (processCustomTemplates)
740740
{
@@ -808,7 +808,7 @@ private Project parseIDL(
808808
}
809809
}
810810
}
811-
811+
812812
System.out.println("Generating Type definition files...");
813813
if ((returnedValue) && (returnedValue =
814814
Utils.writeFile(m_outputDir + ctx.getFilename() + ".h",

0 commit comments

Comments
 (0)