mailcvt 0.1.29 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
data/lib/mail_cleaner.rb CHANGED
@@ -24,11 +24,12 @@ class MailCleaner
24
24
  fok = @fh.getmout('.fok')
25
25
  raise "Can't find #{fok}." unless File.exist?(fok)
26
26
 
27
- File.foreach(fok) do |fn|
27
+ File.foreach(fok) do |line|
28
28
  begin
29
- File.delete fn
29
+ path = line[0..-2]
30
+ File.delete path
30
31
  rescue Exception => e
31
- puts "Can't remove file #{fn}. \n#{e.message}"
32
+ puts "Can't remove file [#{path}]. \nMessage:#{e.message}"
32
33
  end
33
34
  end
34
35
  end
@@ -41,13 +42,14 @@ class MailCleaner
41
42
 
42
43
  Dir.mkdir d
43
44
  hasfile = false
44
- File.foreach(f) do |fn|
45
+ File.foreach(f) do |line|
45
46
  begin
46
- filename = File.basename(fn)
47
- File.rename fn, File.join(d, filename)
47
+ path = line[0..-2]
48
+ filename = File.basename(path)
49
+ File.rename path, File.join(d, filename)
48
50
  hasfile = true
49
51
  rescue Exception => e
50
- puts "Can't move file #{fn} to #{d}. \n#{e.message}"
52
+ puts "Can't move file [#{path}] to [#{d}]. \nMessage:#{e.message}"
51
53
  end
52
54
  end
53
55
 
@@ -1,3 +1,3 @@
1
1
  module Mailcvt
2
- VERSION = '0.1.29'
2
+ VERSION = '0.1.30'
3
3
  end
data/lib/to_cc_parser.rb CHANGED
@@ -23,8 +23,10 @@ class ToCcParser
23
23
  idCc = LogHelper.ids['C']
24
24
  File.open(mlog, 'a') do |omlog|
25
25
  File.foreach(mtocc) do |line|
26
- next unless line
27
- parts = line.split("\t")
26
+ oldlog = line[0..-2]
27
+
28
+ next unless oldlog
29
+ parts = oldlog.split("\t")
28
30
  next if parts.nil? or parts.length < 7
29
31
 
30
32
  fn = parts[0]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailcvt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.30
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -120,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  segments:
122
122
  - 0
123
- hash: 3808846015648753750
123
+ hash: -3865778219648588496
124
124
  required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  none: false
126
126
  requirements:
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  segments:
131
131
  - 0
132
- hash: 3808846015648753750
132
+ hash: -3865778219648588496
133
133
  requirements: []
134
134
  rubyforge_project:
135
135
  rubygems_version: 1.8.25