about summary refs log tree commit homepage
path: root/lib/unicorn/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/util.rb')
-rw-r--r--lib/unicorn/util.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index cde2563..f84241c 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -7,6 +7,7 @@ module Unicorn::Util
     append_flags = File::WRONLY | File::APPEND
 
     ! fp.closed? &&
+      fp.stat.file? &&
       fp.sync &&
       (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
     rescue IOError, Errno::EBADF