@@ -56,14 +56,14 module Redmine | |||||
56 | shellout(cmd) do |io| |
|
56 | shellout(cmd) do |io| | |
57 | prefix = "#{url}/#{path}".gsub('\\', '/') |
|
57 | prefix = "#{url}/#{path}".gsub('\\', '/') | |
58 | logger.debug "PREFIX: #{prefix}" |
|
58 | logger.debug "PREFIX: #{prefix}" | |
59 | re = %r{^V\s+#{Regexp.escape(prefix)}(\/?)([^\/]+)(\/?)\s+(\S+)$} |
|
59 | re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)$} | |
60 | io.each_line do |line| |
|
60 | io.each_line do |line| | |
61 | next unless line =~ re |
|
61 | next unless line =~ re | |
62 |
entries << Entry.new({:name => $ |
|
62 | entries << Entry.new({:name => $3.strip, | |
63 |
:path => ((path.empty? ? "" : "#{path}/") + $ |
|
63 | :path => ((path.empty? ? "" : "#{path}/") + $3.strip), | |
64 |
:kind => ($ |
|
64 | :kind => ($4.blank? ? 'file' : 'dir'), | |
65 | :size => nil, |
|
65 | :size => nil, | |
66 |
:lastrev => Revision.new(:revision => $ |
|
66 | :lastrev => Revision.new(:revision => $5.strip) | |
67 | }) |
|
67 | }) | |
68 | end |
|
68 | end | |
69 | end |
|
69 | end |
General Comments 0
You need to be logged in to leave comments.
Login now