diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-12 18:15:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-12 18:15:19 +0000 |
commit | 7e4aa9ca92f1622a1598be982b98d0e73f904669 (patch) | |
tree | 1eb9ff02be1b1baa9fbf417600585899841dbdb4 /extra | |
parent | c312b8b0584a9e394433a13064450882901e457c (diff) | |
download | redmine-7e4aa9ca92f1622a1598be982b98d0e73f904669.tar.gz redmine-7e4aa9ca92f1622a1598be982b98d0e73f904669.zip |
Fixed windows platform detection in reposman.rb (#5039).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3571 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'extra')
-rwxr-xr-x | extra/svn/reposman.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extra/svn/reposman.rb b/extra/svn/reposman.rb index 8319287e2..b72ad1263 100755 --- a/extra/svn/reposman.rb +++ b/extra/svn/reposman.rb @@ -221,10 +221,14 @@ def other_read_right?(file) end def owner_name(file) - RUBY_PLATFORM =~ /mswin/ ? + mswin? ? $svn_owner : Etc.getpwuid( File.stat(file).uid ).name end + +def mswin? + (RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i) +end projects.each do |project| log("treating project #{project.name}", :level => 1) @@ -303,4 +307,4 @@ projects.each do |project| end end - +
\ No newline at end of file |