mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_rewind): remove fsync() for Windows to improve the
performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9972c18c12
commit
bc08992a2e
2 changed files with 5 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Aug 15 16:59:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_io_rewind): remove fsync() for Windows to improve the
|
||||||
|
performance.
|
||||||
|
|
||||||
Thu Aug 15 16:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
Thu Aug 15 16:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
|
* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
|
||||||
|
|
5
io.c
5
io.c
|
@ -1654,11 +1654,6 @@ rb_io_rewind(VALUE io)
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
|
if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
|
||||||
#ifdef _WIN32
|
|
||||||
if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
|
|
||||||
fsync(fptr->fd);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (io == ARGF.current_file) {
|
if (io == ARGF.current_file) {
|
||||||
ARGF.lineno -= fptr->lineno;
|
ARGF.lineno -= fptr->lineno;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue