Skip to content

Commit eb5484c

Browse files
committed
[cpp]: Bugfix for filename with prepended path. Fix for issue aeron-io#88.
1 parent cf9560c commit eb5484c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main/java/uk/co/real_logic/sbe/SbeTool.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ else if (fileName.endsWith(".sbeir"))
123123

124124
if (Boolean.parseBoolean(System.getProperty(GENERATE_IR, "false")))
125125
{
126-
final int nameEnd = fileName.lastIndexOf('.');
127-
final String namePart = fileName.substring(0, nameEnd);
126+
final File inputFile = new File(fileName);
127+
final String inputFilename = inputFile.getName();
128+
129+
final int nameEnd = inputFilename.lastIndexOf('.');
130+
final String namePart = inputFilename.substring(0, nameEnd);
128131

129132
final String outputDirName = System.getProperty(OUTPUT_DIR, ".");
130133
final File fullPath = new File(outputDirName, namePart + ".sbeir");

0 commit comments

Comments
 (0)