liesel-devs / liesel

A probabilistic programming framework
https://liesel-project.org
MIT License
38 stars 2 forks source link

No error in add_file_handler, if path is not absolute but starts with a slash #164

Closed jobrachem closed 7 months ago

jobrachem commented 8 months ago

One needs to be aware of giving the absolute path to the path argument of add_file_handler, path='/home/...'. There seems to be a problem, however, if you set a path starting with a slash and it is not your absolute path. Then no error occurs and no files are saved (I unintentionally did so and was confused about the whereabouts of the files).

Originally posted by @liesel-groupie in https://github.com/liesel-devs/liesel/discussions/163#discussioncomment-7673495

jobrachem commented 7 months ago

This is expected behavior, starting a path with a slash marks it as absolute. See here, for example: https://stackoverflow.com/questions/7613274/why-would-a-developer-place-a-forward-slash-at-the-start-of-each-relative-path