2 # Copyright (C) 2004 Mauricio Julio Fernández Pradier
3 # See LICENSE.txt for additional licensing information.
6 require 'rubygems/package'
8 module Gem::Package::FSyncDir
13 # make sure this hits the disc
15 def fsync_dir(dirname)
16 dir = open dirname, 'r'
18 rescue # ignore IOError if it's an unpatched (old) Ruby
20 dir.close if dir rescue nil