lnbackup 2.3 → 2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,15 @@ require 'lnbackup/version.rb'
5
5
 
6
6
  require 'find'
7
7
  require 'date'
8
- #require 'ftools'
9
8
  require 'fileutils'
10
9
  begin
11
- require 'filesystem'
12
- rescue LoadError
13
10
  require 'sys/filesystem'
14
11
  include Sys
15
12
  FileSystem = Filesystem
13
+ rescue LoadError
14
+ require 'filesystem'
16
15
  end
17
16
 
18
-
19
17
  require 'logger'
20
18
  require 'time'
21
19
 
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module LnBackup
2
3
  CONFIG_D = '/etc/lnbackup.d/'
3
4
  LOG_FILE = '/var/log/lnbackup'
@@ -701,13 +702,20 @@ class LnBackup
701
702
  end
702
703
  # matchujeme
703
704
  @exclude_list.each do |a|
704
- if (a[2] ? path : rel_path) =~ a[1]
705
- if a[0]
706
- @log.debug { "excluding(#{a[1].source}): #{path}" }
707
- Find.prune
708
- else
709
- return
705
+ begin
706
+ if (a[2] ? path : rel_path) =~ a[1]
707
+ if a[0]
708
+ @log.debug { "excluding(#{a[1].source}): #{path}" }
709
+ Find.prune
710
+ else
711
+ return
712
+ end
710
713
  end
714
+ rescue => e
715
+ @log.warn { "problem with encoding --> not pruning" }
716
+ @log.warn { "pattern: #{a.inspect}, path: #{path.inspect}, rel_path: #{rel_path.inspect}, exception #{e.class}:'#{e.message}'" }
717
+ @log.warn { e.backtrace.join("\n") }
718
+ return
711
719
  end
712
720
  end
713
721
  end
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  class FreeSpaceCalc
2
3
  def initialize( path, free_files=0, free_blocks=10, log=nil )
3
4
  @log = log
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  class File
2
3
  TOO_BIG = 1024 * 1024 * 2 # 2MB
3
4
 
@@ -1,3 +1,3 @@
1
1
  module LnBackup
2
- VERSION=2.3
2
+ VERSION=2.4
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lnbackup
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.3'
4
+ version: '2.4'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-24 00:00:00.000000000 Z
12
+ date: 2012-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sys-filesystem