Make import button gooder, explicitly require excon http client

This commit is contained in:
2024-03-04 16:35:52 -06:00
parent aceed86cb4
commit 3383cbd019
7 changed files with 99 additions and 34 deletions

View File

@@ -238,7 +238,8 @@ class W3DHub
@files.delete_if { |f| f.name.casecmp?(file.name) } unless file.patch?
# If file has been recreated in a newer patch, don't delete it; A full file package will exist for it so it will get completely replaced.
# If file has been recreated in a newer patch, don't delete it;
# A full file package will exist for it so it will get completely replaced.
@deleted_files.delete_if { |f| f.name.casecmp?(file.name) }
@files.push(file)

View File

@@ -1,26 +0,0 @@
class W3DHub
class ApplicationManager
class Importer < Task
LOG_TAG = "W3DHub::ApplicationManager::Importer".freeze
def type
:importer
end
def execute_task
path = W3DHub.ask_file
unless File.exist?(path) && !File.directory?(path)
fail!("File #{path.inspect} does not exist or is a directory")
fail_silently! if path.nil? || path&.length&.zero? # User likely canceled the file selection
end
return false if failed?
Store.application_manager.imported!(self, path)
true
end
end
end
end