From fdb2787ff901325d406b6d42738af65f09927b0e Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Sun, 13 Sep 2015 12:51:02 -0400 Subject: [PATCH] Support '.' in output directory path. Do not call baseName on the path passed to -o when using the --rendertracks option. This was mangling directories that contained a literal '.' if a '/' was not explicitly specified at the end. Still call baseName for --render as the argument to -o is a file and we need to set the extension (ogg/wav). --- src/core/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/main.cpp b/src/core/main.cpp index 6078d4653..8ff44e573 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -311,7 +311,7 @@ int main( int argc, char * * argv ) fileToLoad = QString::fromLocal8Bit( argv[i] ); - renderOut = baseName( fileToLoad ); + renderOut = fileToLoad; } else if( arg == "--loop" || arg == "-l" ) { @@ -329,7 +329,7 @@ int main( int argc, char * * argv ) } - renderOut = baseName( QString::fromLocal8Bit( argv[i] ) ); + renderOut = QString::fromLocal8Bit( argv[i] ); } else if( arg == "--format" || arg == "-f" ) { @@ -602,7 +602,8 @@ int main( int argc, char * * argv ) // otherwise, it is a file, so we need to append the file extension if ( !renderTracks ) { - renderOut = renderOut + ProjectRenderer::getFileExtensionFromFormat(eff); + renderOut = baseName( renderOut ) + + ProjectRenderer::getFileExtensionFromFormat(eff); } // create renderer