lib/webtranslateit/safe/sink.rb in webtranslateit-safe-0.4.3 vs lib/webtranslateit/safe/sink.rb in webtranslateit-safe-0.4.4

- old
+ new

@@ -1,7 +1,9 @@ module WebTranslateIt + module Safe + class Sink < Stream def process return unless active? @@ -13,11 +15,11 @@ # path is defined in subclass # base is used in 'cleanup' to find all files that begin with base. the '.' # at the end is essential to distinguish b/w foo.* and foobar.* archives for example def base - @base ||= File.join(path, File.basename(@backup.filename).split('.').first + '.') + @base ||= File.join(path, "#{File.basename(@backup.filename).split('.').first}.") end def full_path @full_path ||= File.join(path, @backup.filename) + @backup.extension end @@ -28,8 +30,11 @@ to_remove = files[0..(files.size - limit - 1)] # TODO: validate here to_remove.each(&block) end + end + end -end \ No newline at end of file + +end