18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/fig/protocol/file.rb', line 18
def download_list(uri)
packages = []
unescaped_path = CGI.unescape uri.path
return packages if ! ::File.exist?(unescaped_path)
ls = ''
unescaped_path = FileTest.symlink?(unescaped_path) ? ::File.realpath(unescaped_path) : unescaped_path
Find.find(unescaped_path) {
|file|
if FileTest.directory?(file)
ls << file.to_s
ls << "\n"
end
}
strip_paths_for_list(ls, packages, unescaped_path)
return packages
end
|