mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
diff -rup smc-1.9/src/core/filesystem/filesystem.cpp smc-1.9.new/src/core/filesystem/filesystem.cpp
|
|
--- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 12:11:18.000000000 +0200
|
|
+++ smc-1.9.new/src/core/filesystem/filesystem.cpp 2012-07-12 15:36:31.361941069 +0200
|
|
@@ -142,27 +142,27 @@ vector<std::string> Get_Directory_Files(
|
|
if( fs::is_directory( *dir_itr ) )
|
|
{
|
|
// ignore hidden directories
|
|
- if( dir_itr->path().leaf().find( "." ) == 0 )
|
|
+ if( dir_itr->path().filename().string().find( "." ) == 0 )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
if( with_directories )
|
|
{
|
|
- valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
|
|
+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() );
|
|
}
|
|
|
|
// load all items from the sub-directory
|
|
if( search_in_sub_directories )
|
|
{
|
|
- vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories );
|
|
+ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename().string(), file_type, with_directories );
|
|
valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() );
|
|
}
|
|
}
|
|
// valid file
|
|
- else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos )
|
|
+ else if( file_type.empty() || dir_itr->path().filename().string().rfind( file_type ) != std::string::npos )
|
|
{
|
|
- valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
|
|
+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() );
|
|
}
|
|
}
|
|
catch( const std::exception &ex )
|