GNOME Bugzilla – Bug 354973
g_get_home_dir() wrongfully used in test-resolve-file-path.c
Last modified: 2018-06-29 21:12:30 UTC
Please describe the problem: g_get_home_dir() will rely on the content of passwd before HOME, while the xacc* function uses HOME Steps to reproduce: HOME=$(pwd) ./test-resolve-file-path.c Actual results: Expected results: Does this happen every time? Other information: I'm attaching a patch that just replaces the glib function with a direct use of HOME... Maybe the opposite should be done and use g_get_home_dir() in the xacc* function.
Created attachment 72414 [details] [review] patch to replace g_get_home_dir() with getenv("HOME") in the test
getenv("HOME") has been replaced by g_get_home_dir() intentionally in http://svn.gnucash.org/trac/changeset/12025 What is the problem with g_get_home_dir? In any case we are talking about a *test* here, so we're open for proposals that apply to tests but not the actual program runtime.
The current SVN seems ok since changeset 14543 where the getenv call was replaced with g_get_home_dir(). If you want to be certain you can try: HOME=. ./test-resolve-file-path
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=354973. Please update any external references or bookmarks.