From fc968ffe329c40d0aa2516aec2b5a97f0dab4777 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Thu, 2 Jun 2022 08:47:08 -0500 Subject: [PATCH] Removed usage of File.dirname in win32 auto importer since switching the InstallDir reg entry is already a directory and File.dirname chops off the everything after the last slash --- lib/application_manager.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/application_manager.rb b/lib/application_manager.rb index b81c697..c0a9b84 100644 --- a/lib/application_manager.rb +++ b/lib/application_manager.rb @@ -244,14 +244,14 @@ class W3DHub begin reg_constant.open(registry_path, reg_type) do |reg| if (install_path = reg["InstallDir"]) - exe_path = app_id == "ecw" ? "#{File.dirname(install_path)}/game750.exe" : "#{File.dirname(install_path)}/game.exe" + exe_path = app_id == "ecw" ? "#{install_path}/game750.exe" : "#{install_path}/game.exe" if File.exist?(exe_path) install_path.gsub!("\\", "/") installed_version = reg["InstalledVersion"] unless app_id == "ren" application_data = { - install_directory: File.dirname(install_path), + install_directory: install_path, installed_version: app_id == "ren" ? "1.0.0.0" : installed_version, install_path: exe_path, wine_prefix: nil