Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 2495

Show
Ignore:
Timestamp:
10/08/05 18:57:14 (3 years ago)
Author:
marcel
Message:

Skip directories when checking for identical source and destination files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/rails_generator/commands.rb

    r2494 r2495  
    218218        # be evaluated before being compared to the destination. 
    219219        def identical?(source, destination, &block) 
     220          return false if File.directory? destination 
    220221          source      = block_given? ? File.open(source) {|sf| yield(sf)} : IO.read(source) 
    221222          destination = IO.read(destination)