Skip to content

Commit 86efb17

Browse files
author
root
committed
Ignore absent recycle bin dir case
1 parent 08a95dd commit 86efb17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/redmine_gitolite/recycle.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def recover_repository_if_present?(repository)
122122

123123
# Pull up any matching repositories. Sort them (beginning is representation of time)
124124
begin
125-
files = RedmineGitolite::GitHosting.execute_command(:shell_cmd, "find '#{@recycle_bin_dir}' -type d -regex '#{myregex}' -prune || true").chomp.split("\n").sort {|x, y| y <=> x }
125+
files = RedmineGitolite::GitHosting.execute_command(:shell_cmd, "find '#{@recycle_bin_dir}' -type d -regex '#{myregex}' -prune -print 2> /dev/null").chomp.split("\n").sort {|x, y| y <=> x }
126126
rescue Exception => e
127127
files = []
128128
end

0 commit comments

Comments
 (0)