Trim video file extension from glb file name (fixes #422)

This commit is contained in:
Jonas Herzig
2020-11-22 15:18:41 +01:00
parent d06ef47f1c
commit c3c59ec1c0

View File

@@ -213,7 +213,7 @@ public class CameraPathExporter {
java.nio.file.Path videoPath = settings.getOutputFile().toPath();
java.nio.file.Path glbBasePath = Files.isDirectory(videoPath)
? videoPath.resolve("camera.glb")
: videoPath.resolveSibling(videoPath.getFileName() + ".glb");
: videoPath.resolveSibling(FilenameUtils.getBaseName(videoPath.getFileName().toString()) + ".glb");
java.nio.file.Path glbPath = glbBasePath;
for (int i = 0; Files.exists(glbPath); i++) {
String baseName = FilenameUtils.getBaseName(glbBasePath.getFileName().toString());