functions.cpp: fix linux dir divider being used instead of platform specific dir divider
This commit is contained in:
parent
2804c7cc40
commit
4507511494
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user