summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/postrunner/FitFileStore.rb1
-rw-r--r--lib/postrunner/Main.rb8
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/postrunner/FitFileStore.rb b/lib/postrunner/FitFileStore.rb
index 0c4ff2b..b85cdfa 100644
--- a/lib/postrunner/FitFileStore.rb
+++ b/lib/postrunner/FitFileStore.rb
@@ -150,6 +150,7 @@ module PostRunner
def rename_activity(activity, name)
activity.set('name', name)
generate_html_index_pages
+ @store['records'].generate_html_reports if activity.has_records?
end
# Set the specified attribute of the given activity to a new value.
diff --git a/lib/postrunner/Main.rb b/lib/postrunner/Main.rb
index baf6a3e..bb40df2 100644
--- a/lib/postrunner/Main.rb
+++ b/lib/postrunner/Main.rb
@@ -453,7 +453,13 @@ EOT
when :rename
@ffs.rename_activity(activity, @name)
when :set
- @ffs.set_activity_attribute(activity, @attribute, @value)
+ if @attribute == 'name'
+ # We have to handle the 'name' attribute as special case as we have
+ # to update some HTML reports as well.
+ @ffs.rename_activity(activity, @value)
+ else
+ @ffs.set_activity_attribute(activity, @attribute, @value)
+ end
when :show
activity.show
when :sources