justinalsing/pydelfi

use os.path.join to join path and filename

andrewfowlie opened this issue · 0 comments

pydelfi/pydelfi/delfi.py

Lines 160 to 161 in 5c4e7ed

self.graph_restore_filename = results_dir + graph_restore_filename
self.restore_filename = results_dir + restore_filename

It would be better to use https://docs.python.org/2/library/os.path.html#os.path.join and thus not assume that results_dir has a trailing separator. At present, without a trailing separtor, e.g., results_dir = 'here', the results_dir just becomes a prefix for filenames, not a directory.