Permalink
Browse files

Add current dir when loading files

  • Loading branch information...
1 parent 1e923cf commit 029ed941fecf63efa36f91c7897818652dfae572 @smgt smgt committed Sep 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 tracker.rb
View
@@ -8,11 +8,13 @@ def hours
class Tracker
+ @root = File.expand_path(File.dirname(__FILE__))
+
# Time lock
- @@lock_file = "data/clock.lock"
+ @@lock_file = "#{@root}/data/clock.lock"
# Database
- @@data_file = "data/timetracker.db"
+ @@data_file = "#{@root}/data/timetracker.db"
# Workday in seconds
@@workday = 28800

0 comments on commit 029ed94

Please sign in to comment.