Skip to content

Commit

Permalink
Changed from hard coded relative path to detect the scripts path and …
Browse files Browse the repository at this point in the history
…dynamically generate the correct path.

This means that it can be run from any directory which is useful with startup scripts.
  • Loading branch information
openelectron committed Apr 7, 2016
1 parent c790a84 commit 79aab4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion picoreflowd.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def index():
@app.route('/picoreflow/:filename#.*#')
def send_static(filename):
log.debug("serving %s" % filename)
return bottle.static_file(filename, root='./public/')
return bottle.static_file(filename, root=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "public"))


def get_websocket_from_request():
Expand Down

0 comments on commit 79aab4e

Please sign in to comment.