From 748324babe956c59aa1758354376e248b44ce197 Mon Sep 17 00:00:00 2001 From: laurencehardman Date: Tue, 8 Aug 2023 08:19:44 +0200 Subject: [PATCH] Patch FSR module to rather make use of File#exist? method --- lib/fsr.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fsr.rb b/lib/fsr.rb index 7643329..f0f0e5b 100644 --- a/lib/fsr.rb +++ b/lib/fsr.rb @@ -84,8 +84,8 @@ def self.start_ies!(klass, args = {}) # This will enable sqlite db access def self.find_freeswitch_install good_path = FS_INSTALL_PATHS.find do |fs_path| - FSR::Log.warn("#{fs_path} is not a directory!") if File.exists?(fs_path) && !File.directory?(fs_path) - FSR::Log.warn("#{fs_path} is not readable by this user!") if File.exists?(fs_path) && !File.readable?(fs_path) + FSR::Log.warn("#{fs_path} is not a directory!") if File.exist?(fs_path) && !File.directory?(fs_path) + FSR::Log.warn("#{fs_path} is not readable by this user!") if File.exist?(fs_path) && !File.readable?(fs_path) Dir["#{fs_path}/{conf,db}/"].size == 2 ? fs_path.to_s : nil end FSR::Log.warn("No FreeSWITCH install found, database and configuration functionality disabled") if good_path.nil?