scm: filesystem: remove trailing white-spaces from adapter source.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5670 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-06 12:58:14 +00:00
parent dafdcf3879
commit 6d75ac6560
1 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# redMine - project management software # RedMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang # Copyright (C) 2006-2011 Jean-Philippe Lang
# #
# FileSystem adapter # FileSystem adapter
# File written by Paul Rivier, at Demotera. # File written by Paul Rivier, at Demotera.
@ -8,12 +8,12 @@
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@ -39,10 +39,10 @@ module Redmine
end end
def format_path_ends(path, leading=true, trailling=true) def format_path_ends(path, leading=true, trailling=true)
path = leading ? with_leading_slash(path) : path = leading ? with_leading_slash(path) :
without_leading_slash(path) without_leading_slash(path)
trailling ? with_trailling_slash(path) : trailling ? with_trailling_slash(path) :
without_trailling_slash(path) without_trailling_slash(path)
end end
def info def info
@ -60,7 +60,7 @@ module Redmine
trgt = scm_iconv(@path_encoding, 'UTF-8', trgt_utf8) trgt = scm_iconv(@path_encoding, 'UTF-8', trgt_utf8)
Dir.new(trgt).each do |e1| Dir.new(trgt).each do |e1|
e_utf8 = scm_iconv('UTF-8', @path_encoding, e1) e_utf8 = scm_iconv('UTF-8', @path_encoding, e1)
next if e_utf8.blank? next if e_utf8.blank?
relative_path_utf8 = format_path_ends( relative_path_utf8 = format_path_ends(
(format_path_ends(path,false,true) + e_utf8),false,false) (format_path_ends(path,false,true) + e_utf8),false,false)
t1_utf8 = target(relative_path_utf8) t1_utf8 = target(relative_path_utf8)
@ -78,7 +78,7 @@ module Redmine
:path => utf_8_path, :path => utf_8_path,
:kind => (File.directory?(t1) ? 'dir' : 'file'), :kind => (File.directory?(t1) ? 'dir' : 'file'),
:size => (File.directory?(t1) ? nil : [File.size(t1)].pack('l').unpack('L').first), :size => (File.directory?(t1) ? nil : [File.size(t1)].pack('l').unpack('L').first),
:lastrev => :lastrev =>
Revision.new({:time => (File.mtime(t1)) }) Revision.new({:time => (File.mtime(t1)) })
}) })
end end