From 5a3f3500155611734120119e999a6f0790ba6491 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Fri, 24 Oct 2025 23:05:04 -0500 Subject: [PATCH] Fixed edge case where Task#normalize_path wouldn't handle partial matches of correctly --- lib/application_manager/task.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/application_manager/task.rb b/lib/application_manager/task.rb index eb5ba92..019ba8e 100644 --- a/lib/application_manager/task.rb +++ b/lib/application_manager/task.rb @@ -118,12 +118,14 @@ class W3DHub constructed_path = base_path + accepted_parts = 0 split_path = path.split("/") split_path.each do |segment| Dir.glob("#{constructed_path}/*").each do |part| next unless "#{constructed_path}/#{segment}".downcase == part.downcase constructed_path = part + accepted_parts += 1 break if File.file?(constructed_path) end @@ -132,6 +134,8 @@ class W3DHub # Find file if it exists else use provided path as cased if "#{base_path}/#{path}".length == constructed_path.length constructed_path + elsif accepted_parts.positive? + "#{constructed_path}/#{split_path[accepted_parts..].join('/')}" else "#{base_path}/#{path}" # File doesn't exist, case doesn't matter. end