Skip to content

Commit

Permalink
Enable non-link instaces
Browse files Browse the repository at this point in the history
Problem with project_name persists!
  • Loading branch information
Dagefoerde committed Apr 13, 2017
1 parent 724f065 commit a0a99e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Scripts/moodledocker-common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def self.project_path (path)
File.exists? File.join(self.base_dir,entry,"moodle")}
links = []
dirs.each do |entry|
links << File.readlink(File.join(self.base_dir,entry,"moodle"))
dirname = File.join(self.base_dir, entry, 'moodle')
if File.symlink? (dirname) # Follow link.
links << File.readlink(dirname)
else
links << dirname
end
end
pathname = Pathname.new(path)
return links.select {|entry| pathname.fnmatch?(File.join(entry,'**'))}.first()
Expand Down

0 comments on commit a0a99e8

Please sign in to comment.