Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ENXIO raised when hashing UNIX domain socket file

  • Loading branch information...
commit e5152b09b7c37e6dd15836164c7d1f208fa30ce8 1 parent d38437c
@sunaku sunaku authored
View
2  lib/listen/directory_record.rb
@@ -282,7 +282,7 @@ def insert_sha1_checksum(path)
#
def sha1_checksum(path)
Digest::SHA1.file(path).to_s
- rescue Errno::EACCES, Errno::ENOENT
+ rescue Errno::EACCES, Errno::ENOENT, Errno::ENXIO
nil
end
View
10 spec/listen/directory_record_spec.rb
@@ -1161,6 +1161,16 @@
end
end
+ context 'within a directory containing a unix domain socket file' do
+ it 'does not raise an exception when hashing a unix domain socket file' do
+ fixtures do |path|
+ require 'socket'
+ UNIXServer.new('unix_domain_socket.sock')
+ lambda { changes(path){} }.should_not raise_error(Errno::ENXIO)
+ end
+ end
+ end
+
context 'with symlinks', :unless => windows? do
it 'looks at symlinks not their targets' do
fixtures do |path|
Please sign in to comment.
Something went wrong with that request. Please try again.