aboutsummaryrefslogtreecommitdiff
path: root/brep/package-search.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'brep/package-search.cxx')
-rw-r--r--brep/package-search.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/brep/package-search.cxx b/brep/package-search.cxx
index 1617e58..6a349b0 100644
--- a/brep/package-search.cxx
+++ b/brep/package-search.cxx
@@ -65,7 +65,10 @@ namespace brep
// server process.
//
static const size_t rp (options_->results_on_page ());
- static const dir_path& rt (options_->root ());
+ static const dir_path& rt (
+ options_->root ().empty ()
+ ? dir_path ("/")
+ : options_->root ());
params::package_search pr;