Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Invalid File Path in handle_pyc_file Method #60

Open
0x11DFE opened this issue Feb 19, 2024 · 0 comments
Open

Bug: Invalid File Path in handle_pyc_file Method #60

0x11DFE opened this issue Feb 19, 2024 · 0 comments

Comments

@0x11DFE
Copy link

0x11DFE commented Feb 19, 2024

In the handle_pyc_file method of the py_common_dump module, there's an issue with the way the new_file path is being constructed. The current implementation concatenates the output_dir and target_file paths directly, which can result in an invalid path if target_file is an absolute path.

Here's the problematic line of code:

new_file = f'{output_dir}{os.path.sep}{target_file}'

This line should be replaced with:

new_file = os.path.join(output_dir, os.path.basename(target_file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant