• Marc Alff's avatar
    Bug#50337 --defaults-file=~/something doesn't work anymore · edb12213
    Marc Alff authored
    Before this fix, opening a configuration file located under "~" failed.
    To evaluate the "~" path, home_dir needs to be initialized.
    The 'home_dir' variable was initialized too late in my_init().
    
    This fix:
    - moved the home_dir initialization from my_init() to my_basic_init(),
      using getenv("HOME"))
    - moved the initialization of my_umask / my_umask_dir also to
      my_basic_init(), to have all the my_umask / my_umask_dir init code in the
      same place.
    
    The second part is not strictly required, but makes the code more
    maintainable.
    
    Tested the fix manually.
    
    No MTR tests added, because MTR should not access or modify the $HOME
    directory of the user running tests.
    edb12213
my_init.c 19.4 KB