Skip to content

Commit

Permalink
Slight speed up in Protocol::File when listing packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
clonezone committed Feb 7, 2014
1 parent 53baf58 commit cf616bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/fig/protocol/file.rb
Expand Up @@ -19,7 +19,14 @@ def download_list(uri)
return packages if ! ::File.exist?(unescaped_path)

ls = ''
Find.find(unescaped_path) { |file| ls << file.to_s; ls << "\n" }
Find.find(unescaped_path) {
|file|

if FileTest.directory? file
ls << file.to_s
ls << "\n"
end
}

strip_paths_for_list(ls, packages, unescaped_path)

Expand Down

0 comments on commit cf616bc

Please sign in to comment.