Skip to content

Commit

Permalink
Get current directory with Dir.getwd.
Browse files Browse the repository at this point in the history
Fixes #root_path approach of getting the current directory name.
  • Loading branch information
svankmajer committed Jun 26, 2014
1 parent b5a6f02 commit a93090a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/server/sonicpi/lib/sonicpi/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def ensure_dir(d)
end

def root_path
File.absolute_path("#{File.dirname(__FILE__)}/../../../")
File.absolute_path("#{Dir.getwd}/../../../")
end

def etc_path
Expand Down

1 comment on commit a93090a

@samaaron
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I don't see what issue this is fixing. Could you please explain the problem and why this is a solution.

Please sign in to comment.