path_to_renpy_base() should follow symlinks in argv[0]

Bug #1132810 reported by Maks Verver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ren'Py
Fix Released
Undecided
Unassigned

Bug Description

In renpy.py, the function path_to_renpy_base() tries to figure out the base directory by taking os.dirname(sys.argv[0]) but this breaks when renpy.py is executed through a symlink (because then it returns the directory of the symlink, which is probably wrong). Attached is a simple patch that passes argv[0] through os.path.realpath() first.

Revision history for this message
Maks Verver (maksverver) wrote :
Revision history for this message
Tom Rothamel (renpytom) wrote :

I've committed this fix for 6.15, and will release it later today.

In the future, please file issues at our github issue tracker:

https://github.com/renpy/renpy/issues

Changed in renpy:
status: New → Fix Released
Revision history for this message
Maks Verver (maksverver) wrote :

Thanks for the quick response!

I found this bug tracker via the Ren'Py Support page: http://www.renpy.org/support.html
If this is no longer the right place to report bugs, you may want to update the link there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.