log: fix inability to start from the root directory
The function remove_root_directory, which is used for obtaining module names for per-module logging, throws an error when current working directory is `/'. Rewrite it to fix the bug and rename it to strip_cwd_from_path to make the name more clear. Closes #8158 NO_DOC=unreleased NO_CHANGELOG=unreleased
Showing
- src/lua/init.lua 24 additions, 19 deletionssrc/lua/init.lua
- test/app-luatest/gh_8158_start_from_root_dir_test.lua 17 additions, 0 deletionstest/app-luatest/gh_8158_start_from_root_dir_test.lua
- test/app-luatest/per_module_log_unit_test.lua 36 additions, 0 deletionstest/app-luatest/per_module_log_unit_test.lua
Loading
Please register or sign in to comment