method renamed to use the same semantic like duperemove (dedupe_extent)
This commit is contained in:
parent
3cc57e2e78
commit
01b3ebe04f
|
@ -9,14 +9,13 @@ Gem::Specification.new do |s|
|
|||
s.homepage = 'https://git.denkn.at/deac/deduperemoverb'
|
||||
s.summary = 'Deduplication of file junks of found files by deduperemove.'
|
||||
s.files =
|
||||
FileList[
|
||||
'lib/**/*.rb',
|
||||
'bin/*',
|
||||
'Gemfile',
|
||||
'Gemfile.lock',
|
||||
'ext/*/*.c',
|
||||
'ext/*/extconf.rb'
|
||||
]
|
||||
FileList[ %w[
|
||||
lib/**/*.rb
|
||||
bin/*
|
||||
Gemfile Gemfile.lock
|
||||
ext/*/*.c ext/*/extconf.rb
|
||||
]]
|
||||
s.bindir = %w[bin]
|
||||
s.require_paths = %w[lib]
|
||||
s.extensions = %w[ext/deduperemoverb/extconf.rb]
|
||||
|
||||
|
@ -24,5 +23,6 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency "ffi", '~> 1.15'
|
||||
s.add_dependency "sqlite3", '~> 1.4'
|
||||
|
||||
#s.install_tasks name: 'compile'
|
||||
s.requirements << 'cc'
|
||||
s.requirements << 'ruby-dev'
|
||||
end
|
||||
|
|
|
@ -111,7 +111,7 @@ class Duperemove
|
|||
end
|
||||
|
||||
|
||||
def self.duperemove fd, offset, length, dupes
|
||||
def self.dedupe_extent fd, offset, length, dupes
|
||||
rr = FileDedupeRange[dupes.size].new offset, length
|
||||
fds = []
|
||||
dupes.each_with_index do |(fd,os),i|
|
||||
|
@ -224,7 +224,7 @@ class Duperemove
|
|||
begin
|
||||
t1 = Time.now
|
||||
rs =
|
||||
Duperemove.duperemove fst.file,
|
||||
Duperemove.dedupe_extent fst.file,
|
||||
fst.offset,
|
||||
[ fst.size - fst.offset, block_size ].min,
|
||||
fs.map {|f| [f.file, f.offset] }.to_h
|
||||
|
|
Loading…
Reference in a new issue