summaryrefslogtreecommitdiffstats
path: root/src/io/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/resource.cpp')
-rw-r--r--src/io/resource.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/io/resource.cpp b/src/io/resource.cpp
index 127b92b76..65fd01d0e 100644
--- a/src/io/resource.cpp
+++ b/src/io/resource.cpp
@@ -318,27 +318,28 @@ void get_filenames_from_path(std::vector<Glib::ustring> &files, Glib::ustring pa
* path - The directory to parse, will add nothing if directory doesn't exist
* exclusions - Exclude files that exactly match these names.
*/
-void get_foldernames_from_path(std::vector<Glib::ustring> &folders, Glib::ustring path, std::vector<const char *> exclusions)
+void get_foldernames_from_path(std::vector<Glib::ustring> &folders, Glib::ustring path,
+ std::vector<const char *> exclusions)
{
- if(!Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
+ if (!Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
return;
}
Glib::Dir dir(path);
std::string file = dir.read_name();
- while (!file.empty()){
+ while (!file.empty()) {
// If not extensions are specified, don't reject ANY files.
bool reject = false;
// Reject any file which matches the exclusions.
- for (auto &exc: exclusions) {
- reject |= Glib::str_has_prefix(file, exc);
+ for (auto &exc : exclusions) {
+ reject |= Glib::str_has_prefix(file, exc);
}
// Reject any filename which isn't a regular file
Glib::ustring filename = Glib::build_filename(path, file);
- if(Glib::file_test(filename, Glib::FILE_TEST_IS_DIR) && !reject) {
+ if (Glib::file_test(filename, Glib::FILE_TEST_IS_DIR) && !reject) {
folders.push_back(filename);
}
file = dir.read_name();