Correcting listing of dotfiles in home directory

This commit is contained in:
Martinos
2010-03-13 12:42:50 -05:00
parent 863567382a
commit c6a517e100

View File

@@ -42,7 +42,7 @@ class Homesick < Thor
desc "link NAME", "Symlinks all dotfiles from the specified castle" desc "link NAME", "Symlinks all dotfiles from the specified castle"
def link(home) def link(home)
inside castle_dir(home) do inside castle_dir(home) do
files = Pathname.glob('.*')[2..-1] # skip . and .., ie the first two files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
files.each do |path| files.each do |path|
absolute_path = path.expand_path absolute_path = path.expand_path