Skip to content

Commit

Permalink
hack to avoid grit call
Browse files Browse the repository at this point in the history
calling tree to try to determine if a directory exists
exposed this error mojombo/grit#117
hacking a workaround for now to check for the readme using a
method which uses JGit instead
  • Loading branch information
balmas committed May 13, 2015
1 parent 59a366f commit 17ddfb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/models/cite_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ def collection_exists?

path_components << ns
path_components << coll
path_components << "REAMDE.md"

# e.g. CITE_OAC_XML/perseus/mycoll
# e.g. CITE_OAC_XML/perseus/mycoll/README.md
collection_path = File.join(path_components)
tree = self.publication.repository.repo.tree('master', [collection_path])
exists = ! tree.contents.first.nil?
exists = self.publication.repository.get_file_from_branch(collection_path,'master')
exists = ! nil
end

def to_path
Expand Down

0 comments on commit 17ddfb4

Please sign in to comment.