Messages in this thread | ![/](/images/icornerl.gif) | | From | Jialu Xu <> | Subject | Re: [PATCH v4] gen_compile_commands.py: fix path resolve with symlinks in it | Date | Sun, 10 Dec 2023 15:05:32 +0800 |
| |
>Is there any reason why you didn't simply replace >os.path.abspath() with os.path.realpath() ?
I have tried it before, but obviously, I made a mistake.
>This patch uses pathlib.Path() just in one place, >leaving many call-sites of os.path.*() functions. > >If it is just a matter of your preference, >you need to convert os.path.*() for consistency >(as a follow-up patch).
Keep os.path.* as os.path.realpath() works.
>I see one more os.path.abspath() > > return (args.log_level, > os.path.abspath(args.directory), > args.output, > args.ar, > args.paths if len(args.paths) > 0 else [args.directory]) > >Does it cause a similar issue for the 'directory' field >with symbolic link jungles?
Yes, also fixed.
-- Best Regards Jialu Xu
| ![\](/images/icornerr.gif) |