Skip to content

Commit

Permalink
Fix invalid path value
Browse files Browse the repository at this point in the history
  • Loading branch information
knovok committed Oct 27, 2020
1 parent 0b7482d commit 3044e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bootsnap/load_path_cache/path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3044e5f

Please # to comment.