summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/postrunner/Main.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/postrunner/Main.rb b/lib/postrunner/Main.rb
index 8f94eeb..9d7c17e 100644
--- a/lib/postrunner/Main.rb
+++ b/lib/postrunner/Main.rb
@@ -46,12 +46,14 @@ module PostRunner
# exists already.
cfg = (@db['config'] ||= @db.new(PEROBS::Hash))
cfg['unit_system'] ||= :metric
- cfg['html_dir'] ||= File.join(@db_dir, 'html')
cfg['version'] ||= VERSION
# We always override the data_dir as the user might have moved the data
# directory. The only reason we store it in the DB is to have it
# available throught the application.
cfg['data_dir'] = @db_dir
+ # Always update html_dir setting so that the DB directory can be moved
+ # around by the user.
+ cfg['html_dir'] = File.join(@db_dir, 'html')
setup_directories
if (errors = @db.check) != 0