Skip to content

Commit

Permalink
Fix dir backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wells committed Apr 15, 2009
1 parent d5a61f4 commit 3e55f85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/backs3/backup.rb
Expand Up @@ -33,14 +33,18 @@ def last_key
def files_to_backup
@files_to_backup ||= begin
Dir.glob(File.join(@options['folder'], '**', '**')).select do |file|
if @options['exclude'].blank? || file !~ /#{@options['exclude']}/
if full_backup || File.mtime(file).to_i > last_backup
true
if File.directory?(file)
false
else
if @options['exclude'].blank? || file !~ /#{@options['exclude']}/
if full_backup || File.mtime(file).to_i > last_backup
true
else
false
end
else
false
end
else
false
end
end
end
Expand Down

0 comments on commit 3e55f85

Please sign in to comment.