aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/e_repository.cc')
-rw-r--r--paludis/repositories/e/e_repository.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 2b7a16a61..a430aa369 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -491,21 +491,22 @@ namespace
bool illegal(false);
try
{
- do
- {
- FSPath name_file(tree_root);
- name_file /= "profiles";
- name_file /= "repo_name";
-
- if (! name_file.stat().is_regular_file())
- break;
+ FSPath name_file(tree_root);
+ name_file /= "profiles";
+ name_file /= "repo_name";
- LineConfigFile f(name_file, { lcfo_disallow_comments, lcfo_disallow_continuations, lcfo_no_skip_blank_lines });
- if (f.begin() == f.end())
- break;
- return RepositoryName(*f.begin());
-
- } while (false);
+ if (name_file.stat().is_regular_file())
+ {
+ LineConfigFile f(name_file,
+ {
+ lcfo_disallow_comments,
+ lcfo_disallow_continuations,
+ lcfo_no_skip_blank_lines
+ });
+
+ if (f.begin() != f.end())
+ return RepositoryName(*f.begin());
+ }
}
catch (const RepositoryNameError &)
{