From f9623961a5d65c02a7c88668b739f9da4cd90ae9 Mon Sep 17 00:00:00 2001 From: Sam Davies Date: Tue, 19 Mar 2024 13:48:38 +0000 Subject: [PATCH] Fixing issue with deep paths --- app/lib/parser/content_module.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/parser/content_module.rb b/app/lib/parser/content_module.rb index d30bcf7..60bb3a6 100644 --- a/app/lib/parser/content_module.rb +++ b/app/lib/parser/content_module.rb @@ -42,7 +42,7 @@ def parse_lesson(metadata, index) end def parse_segments(segment_yaml_file) - lesson_path = segment_yaml_file.split('/').first + lesson_path = Pathname.new(segment_yaml_file).dirname.to_s lesson = load_yaml_file(apply_path(segment_yaml_file)) lesson[:segments].map do |segment|