Skip to content

Commit

Permalink
Merge pull request #324 from knovok/master
Browse files Browse the repository at this point in the history
Fix invalid path value
  • Loading branch information
casperisfine authored Jun 1, 2022
2 parents 89434cc + 3044e5f commit b7455a3
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 @@ -46,7 +46,7 @@ def to_realpath
# 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 @@ -101,7 +101,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 b7455a3

Please # to comment.