diff options
author | Chris Schlaeger <chris@linux.com> | 2016-01-24 21:28:26 +0100 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2016-01-24 21:28:26 +0100 |
commit | fcb1cdaeb1c08d0e531ed8763780276bd2700b92 (patch) | |
tree | a4cbcfcebf856787bafc09e3c0db5a0b95ca0aa7 | |
parent | 8f442ca7f4faef29348ac813401497477cf5af56 (diff) | |
download | postrunner-fcb1cdaeb1c08d0e531ed8763780276bd2700b92.zip |
Ensure that the html_dir setting in the DB is always updated.
-rw-r--r-- | lib/postrunner/Main.rb | 4 |
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 |