From 450751149456352fccdf59f7a523648c89cca725 Mon Sep 17 00:00:00 2001 From: zvon Date: Mon, 11 May 2020 14:12:26 +0200 Subject: [PATCH] functions.cpp: fix linux dir divider being used instead of platform specific dir divider --- functions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.cpp b/functions.cpp index 6e077e9..7b86195 100644 --- a/functions.cpp +++ b/functions.cpp @@ -419,7 +419,7 @@ string sanitize( const string &str ) { void prepareDB( const string &_pattern ) { auto dbPath = getDBName(); auto dbDir = - dbPath.substr( 0, dbPath.find_last_of( TEXT( "/" ), dbPath.length() ) ); + dbPath.substr( 0, dbPath.find_last_of( dir_divider, dbPath.length() ) ); if ( !FSLib::exists( dbDir ) ) FSLib::createDirectoryFull( dbDir ); @@ -986,7 +986,7 @@ void renameFiles( const std::vector< std::tuple< int, string, string, string > > &renamed_files ) { for ( const auto &renamed : renamed_files ) { FSLib::rename( - std::get< 1 >( renamed ) + TEXT( "/" ) + std::get< 2 >( renamed ), - std::get< 1 >( renamed ) + TEXT( "/" ) + std::get< 3 >( renamed ) ); + std::get< 1 >( renamed ) + dir_divider + std::get< 2 >( renamed ), + std::get< 1 >( renamed ) + dir_divider + std::get< 3 >( renamed ) ); } }