Method: Backup::Syncer::Cloud::LocalFile.new

Defined in:
lib/backup/syncer/cloud/local_file.rb

.new(*args) ⇒ Object

Return a new LocalFile object if it’s valid. Otherwise, log a warning and return nil.



27
28
29
30
31
32
33
34
35
# File 'lib/backup/syncer/cloud/local_file.rb', line 27

def new(*args)
  file = super
  if file.invalid?
    Logger.warn("\s\s[skipping] #{ file.path }\n" +
                "\s\sPath Contains Invalid UTF-8 byte sequences")
    file = nil
  end
  file
end