From 5dea2007746a5d7027cb5b3c70674e94c3563f37 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Jun 2008 15:43:32 +0000 Subject: [PATCH] Filesystem adapter: negative size is displayed for large files under win32. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1509 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/filesystem_adapter.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/redmine/scm/adapters/filesystem_adapter.rb b/lib/redmine/scm/adapters/filesystem_adapter.rb index c06b7e6e3..d300f6cbb 100644 --- a/lib/redmine/scm/adapters/filesystem_adapter.rb +++ b/lib/redmine/scm/adapters/filesystem_adapter.rb @@ -60,8 +60,7 @@ module Redmine # below : list unreadable files, but dont link them. :path => File.readable?(target) ? relative_path : "", :kind => (File.directory?(target) ? 'dir' : 'file'), - :size => if (File.directory?(target)) - nil else File.size(target) end, + :size => (File.directory?(target) ? nil : [File.size(target)].pack('l').unpack('L').first), :lastrev => Revision.new({:time => (File.mtime(target)).localtime, })