mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Make import button gooder, explicitly require excon http client
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user