From 3044e5f8be6bd1e4724531a0b35262d2d822a35e Mon Sep 17 00:00:00 2001 From: Konstantin Novokshonov Date: Tue, 27 Oct 2020 14:13:27 +0300 Subject: [PATCH] Fix invalid path value --- lib/bootsnap/load_path_cache/path.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bootsnap/load_path_cache/path.rb b/lib/bootsnap/load_path_cache/path.rb index b2e13d3d..d006eaac 100644 --- a/lib/bootsnap/load_path_cache/path.rb +++ b/lib/bootsnap/load_path_cache/path.rb @@ -27,7 +27,7 @@ def initialize(path) # True if the path exists, but represents a non-directory object def non_directory? !File.stat(path).directory? - rescue Errno::ENOENT, Errno::ENOTDIR + rescue Errno::ENOENT, Errno::ENOTDIR, Errno::EINVAL false end @@ -77,7 +77,7 @@ def latest_mtime(path, dirs) ["", *dirs].each do |dir| curr = begin File.mtime("#{path}/#{dir}").to_i - rescue Errno::ENOENT, Errno::ENOTDIR + rescue Errno::ENOENT, Errno::ENOTDIR, Errno::EINVAL -1 end max = curr if curr > max