1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
|
# File 'lib/etch/client.rb', line 1628
def get_orig_contents(file)
origpath = save_orig(file)
orig_contents = nil
if (origpath =~ /\.ORIG$/ || origpath =~ /\.TMP$/) &&
File.file?(origpath) && !File.symlink?(origpath)
orig_contents = nil
if RUBY_VERSION.split('.')[0..1].join('.').to_f >= 1.9
orig_contents = IO.read(origpath, :encoding => 'ASCII-8BIT')
else
orig_contents = IO.read(origpath)
end
else
orig_contents = ''
end
orig_contents
end
|