summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/scm/adapters/bazaar_adapter.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb
index 09e840a37..cb266a130 100644
--- a/lib/redmine/scm/adapters/bazaar_adapter.rb
+++ b/lib/redmine/scm/adapters/bazaar_adapter.rb
@@ -248,10 +248,9 @@ module Redmine
end
def self.branch_conf_path(path)
- return unless path
+ return if path.nil?
m = path.match(%r{^(.*[/\\])\.bzr.*$})
- bcp = m ? m[1] : path.dup
- bcp.gsub!(%r{[\/\\]$}, "")
+ bcp = (m ? m[1] : path).gsub(%r{[\/\\]$}, "")
File.join(bcp, ".bzr", "branch", "branch.conf")
end