Permalink
Browse files

ensure filetype matches method name

  • Loading branch information...
1 parent 5752213 commit 290e281d9441ad067730b577d528acf8dd7376f1 @despo committed Mar 18, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -151,8 +151,13 @@ def copy_files files
end
def process_file name
- filetype = File.ftype(name)
- send "copy_#{filetype}", name
+ send "copy_#{filetype(name)}", name
+ end
+
+ def filetype name
+ filetype = File.ftype name
+ filetype = "file" unless ["link", "directory"].include? filetype
+ filetype
end
def copy_link name

0 comments on commit 290e281

Please sign in to comment.