diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-08 03:26:43 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-08 03:26:43 +0000 |
commit | f09f5bc32b54e9d2e9f594fd2a2358af0a0f999a (patch) | |
tree | 90062f3dec7adfc3da17419a1ccf7566ace71793 /lib/unicorn | |
parent | 9a028876d23c7aab1420d81d3c001fbc91354538 (diff) | |
download | unicorn-f09f5bc32b54e9d2e9f594fd2a2358af0a0f999a.tar.gz |
IO#reopen in Rubinius seems to munge the O_APPEND flag when passed a path, however passing an actual IO object. However, at the system call level, everything is the same. ref: http://github.com/evanphx/rubinius/issues/347
Diffstat (limited to 'lib/unicorn')
-rw-r--r-- | lib/unicorn/util.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index 5ceda5c..458b6d7 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -57,7 +57,7 @@ module Unicorn open_arg << ":#{enc.to_s}" enc = fp.internal_encoding and open_arg << ":#{enc.to_s}" end - fp.reopen(fp.path, open_arg) + File.open(fp.path, 'ab') { |tmpfp| fp.reopen(tmpfp) } fp.sync = true new_st = fp.stat if orig_st.uid != new_st.uid || orig_st.gid != new_st.gid |