Skip to content

Commit

Permalink
Pass full string to name decoding (nickbnf#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Oct 23, 2020
1 parent 8687711 commit 49f67f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ struct CliParameters {
options.parse( argc, argv );

for ( const auto& file : raw_filenames ) {
auto decodedName = QFile::decodeName( file.c_str() );
const auto rawName = QByteArray{ file.data(), static_cast<int>( file.size() ) };
const auto decodedName = QFile::decodeName( rawName );
if ( !decodedName.isEmpty() ) {
const auto fileInfo = QFileInfo( decodedName );
filenames.emplace_back( fileInfo.absoluteFilePath() );
Expand Down

0 comments on commit 49f67f9

Please sign in to comment.